简体   繁体   中英

Load R package in SPSS

I have just started working with the integration of R into SPSS and I have problems with loading some R packages in SPSS. I can load eg library(foreign) or library(graphics) but it does not work for library(xlsReadWrite) or library(FactoMineR) . I have installed these packages into R already and I can load them in R also.

When using this syntax in SPSS:

BEGIN PROGRAM R.

library(xlsReadWrite)

END PROGRAM.

I am getting error Error in library(xlsReadWrite) : there is no package called 'xlsReadWrite' .

Many thanks,

Lakuca

In order to build the R plugin/Essentials package, SPSS Statistics has to link with a specific version of R, although you can have others installed as well. SPSS typically releases annually, and the most current R version consistent with the SPSS Statistics release date (which means it has to be available on multiple platforms and stable several months in advance) is used. Even if it isn't the very latest version of R, it is rare for packages not to work in older R versions.

Besides the Essentials package, there are a number of already integrated R packages - SPSS dialog boxes, syntax, and output provided by SPSS or contributed by users - that can be downloaded free from the SPSS Community at www.ibm.com/developerworks/spssdevcentral The R Essentials are currently hosted at SPSS Developer Central at www.spss.com/devcentral.

Regards, Jon Peck

如果您需要早期版本的xlsReadWrite,可以在Archive页面获取源代码

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM