Running IBM SPSS Statistics from an External R Process

Beginning with release 23, you can run R programs that use functions in the R Integration Package for IBM® SPSS® Statistics from any external R process, such as an R IDE or the R interpreter. In this mode, the R program starts up a new instance of the IBM SPSS Statistics processor without an associated instance of the IBM SPSS Statistics client. You can use this mode to debug your R programs using the R IDE of your choice.

To drive the IBM SPSS Statistics processor from an R IDE, simply include a library(spssstatistics) statement in the IDE's code window, followed by a call to the spsspkg.StartStatistics function. You can then call any of the functions in the R Integration Package for IBM SPSS Statistics, just like with program blocks in command syntax jobs, but you do not need to wrap your R code in BEGIN PROGRAM R-END PROGRAM statements.
Note: The spssstatistics R library is installed to the location of R that is specified during the installation of IBM SPSS Statistics - Essentials for R.