0
votes

I've just updated R to R3.3.2 and RStudio to 1.0.136. When I attempted to install UsingR package via the Studio Install Packages menu, I got this message:

ERROR: compilation failed for package ‘Rcpp’ * removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp’ Warning in install.packages : installation of package ‘Rcpp’ had non-zero exit status

Trying to use library(UsingR) produces this message.

library(UsingR) Loading required package: Hmisc Loading required package: ggplot2 Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : there is no package called ‘Rcpp’ Error: package ‘ggplot2’ could not be loaded

I found some stuff about this online, but far too complicated for me to understand. Anyone have a simple way of fixing this?

1

1 Answers

1
votes

I strongly suspect is an error on your end. You are using R 3.2.3, which is outdated by almost one year as R 3.3.0 came out in April, we are now at R 3.3.2.

R stores all its binary packages under a patch with the major.minor. So the most recent OS X (binary) version of Rcpp at indexed at CRAN in a patch with 3.3 (see [here])https://cloud.r-project.org/bin/macosx/mavericks/contrib/3.3/Rcpp_0.12.8.tgz) -- but your version of R will read only at 3.2 so you will not see updated versions.

The easiest fix is to update to R 3.3.2.

Or install manually by downloading from the Rcpp source URL at CRAN and then pointing at the source -- or doing install.packages("Rcpp", type="source"). You may run into other OS X issues for which you will get help from other questions here -- but this gets you current Rcpp.