The Evaulate DAT changes the cells of the incoming DAT using string-editing and math expressions. It outputs a table with the same number of rows and columns.
- The Output menu set to Expressions causes the input cells to be evaluated as expressions. $V is the value of the input cell.
- When there is an expression in Formula, it is applied to all input cells.
- The optional second input DAT is an array of expressions which are matched to the cells of the input, then evaluated and output. If there are fewer rows in the second DAT than the first, the expressions in the last row of the second input are repeated. If there are fewer columns in the second DAT than the first, the last column is repeated.
- Expressions and Commands are optimized by storing a compiled internal version, which runs much faster. Use this where possible. If you are reusing expressions by repeating them in a table, having an input table with the few expressions you will cycle through separate from the data will also improve performance.
If the second DAT is one cell, like the Formula parameter, it applies its expression to all the input cells. A one-cell second DAT with
$V+1 adds 1 to all the first input's cells.
If the second DAT is
then the first row and first column are left intact and the rest of the cells get their
The Evaluate DAT maintains the format of the first input DAT (table or text) unless the Output Table Size parameter is used.
See also the Substitute DAT.
The Evaluate DAT can be used to (1) build strings or (2) do math operations.
$V is the value of the corresponding input cell, and you can use any Variables like
You can use any Expression to fetch data, like
Most useful are the
vs() expressions, which is special to the Evaluate DAT and can access all cells in the input.
vs() differs from
v() as it always output strings, not floats.
vs(row,col) can use the local variables
R (the cell's row) and
C (the cell's column).
v($R,$C)is the same as
v($C,$R)transposes the cells.
- You could address relative rows/columns with
$C+1, and address the cell at the first column with
vwill return the cell contents as floats.
vswill return cell contents as strings.
The expressions that let you get at cells by row/column names are:
and the string versions of the above:
The local variables
NC give the number of rows and columns of the input table.
Input 2 Formula - Each cell should be a one line expression or command.
Input Data DAT
/dat - An alternative DAT table to be used in lieu of an input table.
/dat - An alternative DAT table to be used in lieu of a formula table.
/output - Determines what format will be used for output from the DAT.
/string- Evaluates input data as strings, including expanding any variable values to full strings.
/expr- Evaluates input data as expressions. Compiled.
/expr- Execute input data as a command and output results. Compiled.
- Input Data
/data- Passes through data from first input without manipulation.
/formula- Passes through first input if there is no second input. Otherwise passes through second input. If the first input has more rows or columns than the second one, then the last row or column of the second is repeated to fill out the extra cells.
Output Table Size
/outputsize - If the Output Table Size parameter is Strings, Expressions, or Commands, and there is a second input, you can choose the output table size to be either Input DAT or the Formula DAT. If the Formula DAT is chosen and its table size is greater than the input data table, then the last cell in each row or column will be used when evaluating the remaining formulas.
Monitor Data Dependencies
/dependency - If the Output parameter is set to Strings or Expressions, the DAT will monitor any nodes used by the data, as well as check for time dependencies, and cook accordingly. This toggle is on by default. If you only want the DAT to cook based on input changes, you can turn this off to avoid unnecessary updates.
Convert Backslash Characters
/backslash - Will convert things like \n to newlines, \t to tabs etc. Note that \n, \t will be converted to spaces if the input DAT is a table.
Local variables available are:
$V- input data value.
$R- input row being processed.
$C- input column being processed.
$FR- row of function used.
$FC- column of function used.
$NR- number of input rows.
$NC- number of input columns.
NOTE: if the second input DAT is omitted and no formula is specified, then only the
$R, $C, $NR and
$NC variables are available.