简体   繁体   English

带有R版本3.2.2和插入符号包的Revolution R Enterprise

[英]Revolution R Enterprise with R version 3.2.2 and caret package

I am using Revolution R Enterprise with R version 3.2.2 (2015-08-14) 我正在使用带有R版本3.2.2的Revolution R Enterprise(2015-08-14)

when I am trying to installed library(caret) I got this error 当我尝试安装library(caret)出现此错误

library(caret)
Loading required package: ggplot2
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  there is no package called ‘Rcpp’
In addition: Warning messages:
1: package ‘caret’ was built under R version 3.2.5 
2: package ‘ggplot2’ was built under R version 3.2.4 
Error: package ‘ggplot2’ could not be loaded

please help me I tried many things and every things but I still have this error 请帮助我,我尝试了很多事情,但仍然有此错误

So, that warning is pretty common with R packages. 因此,该警告在R软件包中非常普遍。 It is just a disclosure of what version the package was tuned to when it was created. 这仅是说明软件包在创建时已调整为哪个版本。 That does not mean the package did not install properly.So there are a few things that I do when this happens (and it happened to me at work today with the sp mapping package). 这并不意味着该软件包未正确安装。因此,发生这种情况时,我需要做一些事情(而今天,使用sp映射软件包的工作就发生在我身上)。

  1. If you are in RStudio, use the tools to update all packages as well updating R itself, save everything in your script, close it up. 如果您在RStudio中,请使用工具来更新所有软件包以及更新R本身,将所有内容保存在脚本中,然后将其关闭。 Restart you entire computer. 重新启动整个计算机。

  2. Reinstall the packages you need with install.packages("packagename", dependencies= TRUE) . 使用install.packages("packagename", dependencies= TRUE)重新安装所需的软件包。 If a package is dependent on another package, then you will catch it here. 如果一个程序包依赖于另一个程序包,那么您将在这里捕获它。

  3. Then go back through the console and see all of the dependent package names that installed with your new package and update those with dependencies=TRUE as well. 然后回过控制台,查看与新软件包一起安装的所有相关软件包名称,并使用dependencies=TRUE更新那些软件包名称。 It is possible the Rcpp is installed but needs another package to support your target package. 可能已经安装了Rcpp,但需要另一个软件包来支持您的目标软件包。

  4. I would again properly quit R or RStudio and then reboot the computer again. 我将再次正确退出R或RStudio,然后再次重新启动计算机。

I know it seems like overkill, but it has worked miracles for me on many occasions. 我知道这似乎有点过分,但是在很多场合它为我创造了奇迹。 You need to start all the way at the beginning to make it happen. 您需要从头开始一路实现。

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

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