R

IBM® SPSS® Modeler supports R.

Allowable syntax

  • In the syntax field on the Syntax tab of the various Extension nodes, only statements and functions that are recognized by R are allowed.
  • For the Extension Transform node and the Extension model nugget, data passes through the R script (in batch). For this reason, R scripts for model scoring and process nodes should not include operations that span or combine rows in the data, such as sorting or aggregation. This limitation is imposed to ensure that data can be split up in a Hadoop environment, and during in-database mining. Extension Output and Extension model building nodes do not have this limitation.
  • The addition of a non-batch data transfer mode, in both the Extension Transform node and the Extension model nugget, means that you can either span or combine rows in the data in SPSS Modeler Server.
  • All R nodes can be seen as independent global R environments. Therefore, using library functions within the two separate R nodes requires the loading of the R library in both R scripts.
  • To display the value of an R object that is defined in your R script, you must include a call to a printing function. For example, to display the value of an R object that is called data, include the following line in your R script:
    print(data)
  • You cannot include a call to the R setwd function in your R script because this function is used by IBM SPSS Modeler to control the file path of the R scripts output file.
  • Stream parameters that are defined for use in CLEM expressions and scripting are not recognized if used in R scripts.