【问题标题】:downgrading a package in R降级R中的包
【发布时间】:2015-07-22 00:19:00
【问题描述】:

我最近安装了forecast 包,使用install.packages()
最新版本(6.1)已成功安装,但我想安装预测包版本5.9。所以我用了:

install.packages('http://cran.rstudio.com/src/contrib/Archive/forecast/forecast_5.9.tar.gz', repos=NULL, type='source')

但是在使用库时出现错误:

install.packages('http://cran.rstudio.com/src/contrib/Archive/forecast/forecast_5.9.tar.gz', repos=NULL, type='source')
Installing package into ‘C:/Users/.../Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/Archive/forecast/forecast_5.9.tar.gz'
Content type 'application/x-gzip' length 156982 bytes (153 KB)
downloaded 153 KB

* installing *source* package 'forecast' ...
** package 'forecast' successfully unpacked and MD5 sums checked
** libs

*** arch - i386
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-32~1.1/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.1/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="forecast.dll" OBJECTS="calcBATS.o calcTBATS.o etsTargetFunction.o etsTargetFunctionWrapper.o etscalc.o etspolyroot.o makeBATSMatrices.o makeTBATSMatrices.o updateMatrices.o updateTBATSMatrices.o"' had status 127
ERROR: compilation failed for package 'forecast'
* removing 'C:/Users/.../Documents/R/win-library/3.2/forecast'
* restoring previous 'C:/Users/.../Documents/R/win-library/3.2/forecast'
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
  problem copying C:\Users\...\Documents\R\win-library\3.2\00LOCK-forecast\forecast\libs\x64\forecast.dll to C:\Users\...\Documents\R\win-library\3.2\forecast\libs\x64\forecast.dll: Permission denied
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\...\Documents\R\win-library\3.2" "C:/Users/.../AppData/Local/Temp/RtmpQzO3Zp/downloaded_packages/forecast_5.9.tar.gz"' had status 1
Warning in install.packages :
  installation of package ‘C:/Users/.../AppData/Local/Temp/RtmpQzO3Zp/downloaded_packages/forecast_5.9.tar.gz’ had non-zero exit status

【问题讨论】:

  • 如果在安装 5.9之前首先删除 forecast6.1 会发生什么?

标签: r installation package


【解决方案1】:

这里是安装预测版本 5.9 的方法(如果你已经安装了预测 6.1,这不是问题,它会单独安装 5.9,这意味着你会在安装的包中看到两个预测包)。 转到链接https://cran.r-project.org/src/contrib/Archive/forecast/ 下载预测5.9(只需点击它,它将开始下载文件。 现在打开 R 工作室,单击安装包并将安装从更改为:包存档文件(只需浏览到 zip 文件的位置)。您的包将被安装。 在我的情况下使用预测包时,当两个预测包都加载时它不起作用(使用预测包的功能)。所以我使用预测 5.9 确保没有加载 6.1。 希望有帮助

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-11-04
    • 2019-09-02
    • 1970-01-01
    • 1970-01-01
    • 2022-12-18
    • 2021-01-17
    • 2017-07-26
    • 1970-01-01
    相关资源
    最近更新 更多