IBM® SPSS® Statistics provides the ability to create custom components in R that read the case data from the active dataset, apply algorithms written in R to the data, and write the results back to IBM SPSS Statistics as a new dataset or as pivot table or R graphic output directed to the Viewer, or exported via the Output Management System (OMS). You can analyze your data with an R function that you write or you can use a function from the extensive set of statistical routines available with R, all from within IBM SPSS Statistics.

With this technology you can:

  • Create a custom IBM SPSS Statistics command--referred to as an extension command--that provides an interface to an R function from command syntax. The underlying R implementation code is completely hidden from the user, who only needs to know the command syntax for your command. See Creating Extension Commands for details.
  • Create a custom dialog that generates and runs the command syntax for an extension command. Users only need to understand how to use the dialog in order to run the associated extension command, although the command syntax is available to them through the same Paste button mechanism as for built-in IBM SPSS Statistics dialog boxes. See Custom Dialogs for Extension Commands for details.
  • Create a custom dialog that directly generates and runs R code without the use of an extension command. This approach is simpler to learn and use than working with extension commands, but is best suited for modest amounts of code. See Custom Dialogs for Generating Explicit R Code for details. Complex R programs are best implemented with extension commands, wrapped in custom dialogs.
Note: Refer to the IBM SPSS Statistics - Integration Plug-in for R wiki page for information regarding downloading, installing, and configuring the IBM SPSS Statistics - Integration Plug-in for R.