This article explains how to add R functions into Spotfire expression language in Spotfire® Using IronPython Scripting
Introduction
Use the DataFunctionExpressionFunction to register a function in the Spotfire expression language (is based on TIBCO Enterprise Runtime for R). Once an expression function has been created, it is available in the Spotfire expression language.
Code Sample
# Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license. import Spotfire.Dxp.Data.DataFunctions.DataFunctionExpressionFunction as df import Spotfire.Dxp.Data.DataType as dt func = df.CreateTERRExpressionFunction( "output<-input1*2", "DoubleInput", "Doubles the input", "Math functions", dt.Real ) Document.Data.ExpressionFunctions.Add(func)
References
- DataFunctionExpressionFunction Class: https://docs.tibco.com/pub/doc_remote/sfire_dev/area/doc/api/TIB_sfire-analyst_api/html/T_Spotfire_Dxp_Data_DataFunctions_DataFunctionExpressionFunction.htm
Recommended Comments
There are no comments to display.