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

时间:2015-01-15 14:05:11

标签: r package versions

当我想运行旧脚本时,我已更新R并遇到问题。具体来说,我使用的其中一个软件包已从CRAN中删除,当我尝试加载已安装的软件包时,我收到以下错误消息(从最新版本的软件包的二进制文件安装没有任何问题。正如您所看到的,有问题的包装是ACER包装:)

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

是否可以重新编译源文件以获取适用于R>的二进制文件? 3.0.0?这个软件包在以前的版本R 3.0.1上工作正常,但在R 3.1.1上没有。有没有什么方法可以在R 3.1.1上正确加载这个包(使用源文件或为R 3.0.1编译的文件?

我已经尝试从源代码安装,但它不起作用。我收到此错误消息,这对我来说没有多大意义。有一个简单的方法吗?

> 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

我也试过从命令行安装它但得到类似的错误。有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

你是否安装了Rcpp并且在你的路上?

我认为make上的错误代码127意味着在$ PATH中找不到该程序,并且acer的唯一依赖关系似乎是Rcpp。

希望这会有所帮助 -A