Jump to content
  • TIBCO Spotfire User Group Tips & Tricks: Create you own functions using TERR & R


    Create you own functions using TERR & R

    Data functions that call the TIBCO Enterprise Runtime for R engine can now be configured to aggregate data. In the image below, a new expression function has been created using the new Function type "Aggregation function":





    In the example above the function FahrenheitToCelcius is defined using the code below:



    #Define the FahrenheitToCelcius function
    FahrenheitToCelcius <- function(TempCelcius)
     TempFahrenheit <- TempCelcius *(9/5) + 32


    #Run the function to produce the output
    output <- FahrenheitToCelcius(TempCelcius = input1)

    Once defined, the function can be used to add a "normal" calculated column.


    User Feedback

    Recommended Comments

    There are no comments to display.

  • Create New...