BUFFER
Applies to PredictiveInsight only.
Syntax
BUFFER(data)
Parameters
data
The values to copy as constants. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. For the format definition of data, see the "Macro Function Parameters" section in the chapter in this guide for your IBM® product.
Description
BUFFER makes a dynamic copy of the values in specified data range. These copied values change if the corresponding values in the input column(s) change. BUFFER returns one new column for each input column, each containing a copy of the values in the corresponding input column.
*
Applying the BUFFER macro function can result in significant performance improvements in running experiments. If the input or output columns for an experiment are based on complex (slow) calculations in the spreadsheet, add the BUFFER macro function to each of the columns. This will calculate the values and store the calculated values. Otherwise, every time the experiment accesses the spreadsheet for pattern data, the values must be recomputed. If any of the input values change, the data in BUFFER will dynamically update like other macro functions in the spreadsheet.
*
If the data values will not ever change, use the CONSTANT macro function instead. This creates a static copy of the data range.
*
If a user function is built from a function definition using the BUFFER macro function, the portion of the function definition enclosed in the BUFFER macro function is considered a constant. Any input variables will not be required to apply the user function.
Examples
Creates a new column named TEMP containing the value 4.3.
Creates a new column named TEMP, where each value is a copy of the contents of column V1.
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are copies of the contents of column V1, the values of the VX column are copies of the contents of column V2, and the values of the VY column are copies of the contents of column V3.
Creates a new column named TEMP, where the first 11 cells contain copies of the values in rows 10-20 of column V1. The other cells in TEMP are empty.
Creates two new columns named TEMP and VX, each with values in rows 1-50 (the other cells are empty). The values in column TEMP are copies of the rows of column V1, and the values in column VX are copies of the values in column V2.
Creates three new columns named TEMP, VX, and VY. The three columns contain the valid rows (that is, rows which do not contain any ??? cells) of columns V1 - V3. Wrapping the EXTRACT macro function inside CONSTANT prevents columns TEMP, VX, and VY from being recomputed if columns V1 - V3 change, thereby avoiding the computationally intensive EXTRACT macro function.
Related Functions