TERRAggregation_String
In the Spotfire
Custom Expressions dialog box, you can select the pre-defined expression
TERRAggregation_String
from the
Function list. This expression function sets the variable
output
to a scalar value of the TERR data type
character
, which Spotfire converts to the corresponding Spotfire data type String.
The TERR script is called once for each group of data to be aggregated. No special handling for aggregation is necessary in your TERR script.
Argument | Argument description |
---|---|
A TERR script. | The TERR script contains the following.
|
Spotfire column names. | Passed as additional arguments, these are the data column names that
input1 to
inputN represent. All columns must be the same length.
|
Returned by TERR | Converted in Spotfire |
---|---|
A single aggregated value of data type
character . The returned output must be encoded as UTF-8.
|
A single aggregated value of data type String. |
TERRAggregation_String example
TERRAggregation_String("output <- input2[input1==max(input1)]", [1])
Important: Spotfire autocorrects the function case or name to that of built-in Spotfire function names. (For example, TERR contains the function
max
, and Spotfire contains the function
Max
. ) You must overwrite this autocorrection manually to ensure that you use the TERR function case and name in your expression function.
See Embedding the contents of a script in an expression function for a detailed procedure for creating an expression function.
Parent topic: Built-In TERR Expression Functions in Spotfire