【问题标题】:Failing to install LTM in R无法在 R 中安装 LTM
【发布时间】:2022-06-11 03:27:37
【问题描述】:

我是 R 和任何类型编程的完全初学者,并且正在努力安装 LTM 包以在 SPSS 26 中进行 rasch 分析。

我用过命令

install.packages("ltm")

在 R3.3、3.5 和 3.6(都在 MS windows 中)尝试过,因为它们与我可以访问的 SPSS 版本兼容,并返回以下输出:

*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*

我还尝试安装早期版本的 admiscpolycor,但收到一条错误消息,指出此版本的 R 无法使用它们。

希望有人能发现我在这里做错了什么!

提前致谢

【问题讨论】:

  • 听起来你需要安装rtools,它可以让你从源代码构建包。
  • @AllanCameron 是正确的。此外,当被询问时,您可以选择二进制版本而不是源版本。二进制版本是预编译的,而源版本(通常是较新的)需要编译和附加软件,因此需要使用 rtools。

标签: r


猜你喜欢
  • 2020-07-02
  • 2015-08-30
  • 2018-09-24
  • 2014-01-31
  • 2023-04-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多