Revolution R Enterprise with R version 3.2.2 and caret package

1.5k Views Asked by At

I am using Revolution R Enterprise with R version 3.2.2 (2015-08-14)

when I am trying to installed library(caret) I got this error

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

1

There are 1 best solutions below

2
sconfluentus On

So, that warning is pretty common with R packages. 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).

  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. Restart you entire computer.

  2. Reinstall the packages you need with 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. It is possible the Rcpp is installed but needs another package to support your target package.

  4. I would again properly quit R or RStudio and then reboot the computer again.

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.