0

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 Answer 1

1

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.

4
  • Sorry, that was a typo. I did download R 3.3.2.
    – David
    Jan 15, 2017 at 17:10
  • Try installing Rcpp then. There are some other related questions here wrt different OS X versions. Jan 15, 2017 at 17:25
  • Turns out it was updating to Sierra on Mac but not starting Xcode. Once I started Xcode, the install worked.
    – David
    Jan 15, 2017 at 19:29
  • As we suspected, a local issue. Jan 15, 2017 at 21:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.