简体   繁体   中英

Failing to install LTM in R

I'm a complete beginner with R and any kind of programming really, and struggling with installing the LTM package for use in making a rasch analysis in SPSS 26.

I've used the command

install.packages("ltm")

tried in R3.3, 3.5 and 3.6 (all in MS windows) as these are compatible with the versions of SPSS I have access to, and get the following output returned:

*Installing package into ‘C:/Users/info/OneDrive/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified) also installing the dependencies ‘admisc’, ‘polycor’   There are binary versions available but the source versions are later:
        binary source needs_compilation admisc     0.8   0.28             FALSE polycor 0.7-10  0.8-1             FALSE ltm      1.1-1  1.2-0    FALSE installing the source packages ‘admisc’, ‘polycor’, ‘ltm’ trying URL 'https://cran.ma.imperial.ac.uk/src/contrib/admisc_0.28.tar.gz' Content type 'application/x-gzip' length 58877 bytes (57 KB) downloaded 57 KB trying URL 'https://cran.ma.imperial.ac.uk/src/contrib/polycor_0.8-1.tar.gz' Content type 'application/x-gzip' length 13931 bytes (13 KB) downloaded 13 KB trying URL 'https://cran.ma.imperial.ac.uk/src/contrib/ltm_1.2-0.tar.gz' Content type 'application/x-gzip' length 287001 bytes (280 KB) downloaded 280 KB
* installing *source* package 'admisc' ...
** package 'admisc' successfully unpacked and MD5 sums checked
** libs
*** arch - i386 Warning in system(cmd) : 'make' not found ERROR: compilation failed for package 'admisc'
* removing 'C:/Users/info/OneDrive/Documents/R/win-library/3.5/admisc'
* restoring previous 'C:/Users/info/OneDrive/Documents/R/win-library/3.5/admisc' In R CMD INSTALL
* installing *source* package 'polycor' ...
** package 'polycor' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :    namespace 'admisc' 0.8 is being loaded, but >= 0.22 is required ERROR: lazy loading failed for package 'polycor'
* removing 'C:/Users/info/OneDrive/Documents/R/win-library/3.5/polycor' In R CMD INSTALL ERROR: dependency 'polycor' is not available for package 'ltm'
* removing 'C:/Users/info/OneDrive/Documents/R/win-library/3.5/ltm' In R CMD INSTALL The downloaded source packages are in
        ‘C:\Users\info\AppData\Local\Temp\Rtmpc5HpAg\downloaded_packages’ Warning messages: 1: In install.packages("ltm") :   installation of package ‘admisc’ had non-zero exit status 2: In install.packages("ltm") :   installation of package ‘polycor’ had non-zero exit status 3: In install.packages("ltm") :   installation of package ‘ltm’ had non-zero exit status*

I've also attempted to install earlier versions of admisc and polycor but get an error message that they are not available with this version of R.

Hope somebody can spot what I'm doing wrong here!

Thanks in advance

The error message 'make' not found suggests that you need to install Rtools to be able to build packages in Windows.

Since you are using an old R version you also need older Rtools version like Rtools35, found here .

When installing Rtools remember to add rtools to Path using the checkbox in the dialog similar to that one.

在此处输入图像描述

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