R
Starting with IBM® SPSS® Statistics 29, R 4.2 is a part of the product. It includes the IBM SPSS Statistics - Integration Plug-in for R and a set of extension commands that are implemented in R that provide capabilities beyond what is available with built-in SPSS Statistics procedures.
To determine which R packages are required for a specific R extension command , open the Extension Hub dialog (Installed tab, and then click More info for the desired extension. The required R packages are listed on the Extension Details dialog. R packages can be obtained from any of the R CRAN mirror sites, which are accessed from http://www.r-project.org/. Be sure to obtain the versions of the packages that match your R version. The version-specific packages are available from links on the "Contributed Packages" page of the CRAN mirror site.
), click theRefer to the following introductory video for a brief overview on R programmability enhancements:
R runtime environment
Starting with IBM SPSS Statistics 28.0, an easily configurable R runtime environment is included with the product installation. The runtime environment is configured for use with SPSS Statistics. You can enter R code directly in the runtime environment console.
The R runtime environment is accessed by clicking the R for SPSS Statistics option (Start menu for Windows or Launchpad for macOS). The runtime environment can also be activated via command line by running the statisticsr.bat (Windows) or statisticsr (UNIX) script. The script is located in the IBM SPSS Statistics installation path (bin folder in UNIX).
Linux Red Hat 8.3 server
# install libgfortran.so.3
yum install compat-libgfortran-48
# install libreadline.so.6
yum install readline
# install libicuuc.so.50 and libicui18n.so.50
yum install libicu
# install libpng15.so.15
yum install libpng15
ZLinux Red Hat 7.9 server
# install libgfortran.so.3
yum install libgfortran
PLinux Red Hat 8.3 server
# install libgfortran.so.3
yum install compat-libgfortran-48
# install libreadline.so.6
yum install readline
External R distribution
To use an external R distribution, in the File Locations tab set the R home directory field to the external distribution location ( ).
[R]
HOME=
LIB_NAME=InvokeR
R 3rd party packages
The following steps explain the process of manually installing 3rd party R packages:
- Open a command line instance and go to the SPSS Statistics installation path (bin folder on UNIX).
- Launch the R runtime environment via the statisticsr script.
- In the R runtime environment, use the install.packages
function to install 3rd party packages from CRAN. For example:
Single package:
install.packages(“package_name")
Multiple packages:
install.packages(c(“package_name1”, “package_name2”))
For more information, see https://www.rdocumentation.org/packages/utils/versions/3.6.2/topics/install.packages.
Known issues
BEGIN PROGRAM R
END PROGRAM.