简体   繁体   English

使用尚未在较新版本的R上更新的旧包

[英]Using old packages that has not been updated on newer version of R

I have updated R and get problems when I want to run old scripts. 我已经更新了R并在我想运行旧脚本时遇到问题。 Specifically, one of the packages I use has been removed from CRAN and I get the following error message when I try to load the installed package (installed from a binary file of the latest version of the package without any problem. As you can see, the package in question is the ACER package): 具体来说,我使用的其中一个软件包已从CRAN中删除,当我尝试加载已安装的软件包时,我收到以下错误消息(从最新版本的软件包的二进制文件安装没有任何问题。正如您所看到的,有问题的包是ACER包裹):

Failed with error:  ‘package ‘acer’ was built before R 3.0.0: please re-install it’

Is it possible to recompile the source file to get binary files that work on R > 3.0.0?? 是否可以重新编译源文件以获取在R> 3.0.0上工作的二进制文件? This package worked fine on previous version R 3.0.1, but not on R 3.1.1. 这个软件包在以前的版本R 3.0.1上工作正常,但在R 3.1.1上没有。 Is there any way I can get this package correctly loaded on R 3.1.1 (using either the source file or the file compiled for R 3.0.1? 有没有什么方法可以在R 3.1.1上正确加载这个包(使用源文件或为R 3.0.1编译的文件?

I already tried to install from source, but it doesn't work. 我已经尝试从源代码安装,但它不起作用。 I get this error messages, which don't make too much sense to me. 我收到此错误消息,这对我来说没有多大意义。 Is there an easy way out of this? 有一个简单的方法吗?

> install.packages(pkgs="acer_0.1.2.tar.gz", type="source", repos=NULL)

Installing package into ‘C:/Users/user/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
* installing *source* package 'acer' ...
** package 'acer' successfully unpacked and MD5 sums checked
** libs

*** arch - i386
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-31~1.1/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-31~1.1/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="acer.dll" OBJECTS="estimate_acer.o peaks.o"' had status 127
ERROR: compilation failed for package 'acer'
* removing 'C:/Users/user/Documents/R/win-library/3.1/acer'
* restoring previous 'C:/Users/user/Documents/R/win-library/3.1/acer'
Warning messages:
1: running command '"C:/PROGRA~1/R/R-31~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\user\Documents\R\win-library\3.1" "acer_0.1.2.tar.gz"' had status 1 
2: In install.packages(pkgs = "acer_0.1.2.tar.gz", type = "source",  :
  installation of package ‘acer_0.1.2.tar.gz’ had non-zero exit status

I also tried installing it from the command line but get similar errors. 我也尝试从命令行安装它,但得到类似的错误。 Can anyone help? 有人可以帮忙吗?

Do you have Rcpp installed and on your path? 你在路上安装了Rcpp吗?

I think error code 127 on make means that the program couldn't be found in your $PATH and the only dependency of acer seems to be Rcpp. 我认为make上的错误代码127意味着在$ PATH中找不到该程序,并且acer的唯一依赖关系似乎是Rcpp。

Hope this helps -A 希望这会有所帮助-A

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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