Details on Expression Functions


Use the Expression Functions dialog to register a function in the Spotfire expression language that is based on TIBCO Enterprise Runtime for R. Once an expression function has been created, it is automatically available in the Spotfire expression language.

Tip: If you are developing scripts using TIBCO Enterprise Runtime for R, you can use RStudio, a full-featured, open-source integrated development environment for working with R code. It is provided independently of TIBCO Software Inc. You can configure RStudio to use the TIBCO Enterprise Runtime for R engine and to display its language reference. Also, you can access the TIBCO Enterprise Runtime for R language reference at https://docs.tibco.com/products/tibco-enterprise-runtime-for-r.

  1. Select Edit > Data Function Properties, and then click the Expression Functions tab.

  2. Click New.

df_details_on_expression_functions_d.png

Option

Description

Name

The name of the Expression Function that appears when browsing the function list.

Function type

Specifies whether the new expression function should be a column function or an aggregation function.

Column functions return the same number of rows as the input, whereas an aggregation function aggregates the input values into a single output value.

Description

A description of the function, displayed when browsing the function list (for example, in Custom Expressions or Insert Calculated Column dialog).

Return type

The Spotfire data type that the script should return.

Category

The category in the function list in which to place the function, in the Custom Expressions and Insert Calculated Column dialogs.

A proper categorization of the functions may make them easier to find when working with them in expressions.

Script

TIBCO Enterprise Runtime for R script to use.

For column functions the script should return the same number of rows as the input, whereas for an aggregation function the script should aggregate the input values into a single output value. The output must be placed in a variable called output.

See also:

How to Create an Expression Function