R CRAN, install library Rcpp fails after R3.2 upgrade

Matt9 picture Matt9 · May 18, 2015 · Viewed 13.8k times · Source

I upgraded from R-3.1 to R-3.2. OK ( Standard upgrade)

But this upgrade seems to have lost all the installed packages ( ggplot2, quantmod, Rcpp among dozens and dozens of others).

So installed many from the RStudio tools menu option. Most were successful. But problem with Rcpp (when installing as dependency from ggplot2). The same issue occurs when installing package data.table:

Warning in install.packages :   unable to move temporary installation
‘C:\Users\euclid\Documents\R\win-library\3.2\file40fc19bc2752\colorspace’
to ‘C:\Users\euclid\Documents\R\win-library\3.2\colorspace’ package
‘Rcpp’ successfully unpacked and MD5 sums checked Warning in
install.packages :   unable to move temporary installation
‘C:\Users\euclid\Documents\R\win-library\3.2\file40fc53e26272\Rcpp’ to
‘C:\Users\euclid\Documents\R\win-library\3.2\Rcpp’

Note: The identical error occurs when installing package Rcpp on its own.

Any suggestions appreciated.

Answer

Dirk Eddelbuettel picture Dirk Eddelbuettel · May 18, 2015

You need to have 'vanilla' session without any packages loaded in order to update those package -- it is a well-known (and still annoying) Windows shortcoming that you cannot update a package which currently had (object) code loaded. As Rcpp comes with a small dll ... you get bitten.