Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

r

rcpp

cran

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.

like image 710
Matt9 Avatar asked May 18 '15 16:05

Matt9


4 Answers

I had the same issue: installed "shiny" but running library(shiny) returns error message saying I have no Rcpp package. Installed Rcpp package and got warning

package ‘Rcpp’ successfully unpacked and MD5 sums checked Warning: unable to move temporary installation The downloaded binary packages are in Temp folder C:\Users\Olga\AppData\Local\Temp\RtmpyOXKt4\downloaded_packages

I opened the above folder and copied folder Rcpp from it into the location where it needs to be. Shiny is up and running now.

like image 166
OlgaS Avatar answered Nov 14 '22 13:11

OlgaS


I think this was already mentioned above, but I ran into the same issue. Pay special attention to a few things. First, which packages are missing? For example, when I was installing dplyr, I was missing the dependency Rbcc. So I had to go back and install that package separately. Let the package install into whichever default temporary folder it needs to. In my case, it was C:\Users\Andre\AppData\Local\Temp\Rtmpisa3bO\downloaded_packages\Rcpp. AppData was not visible, so I had to manually type that in. Go and track it down, manually unzip that folder from the .zip to a regular folder. This new folder will be your new package name. Copy that newly unzipped folder to the R library you are working out of. You should now be able to start using it. Hope this helps.

like image 34
Andrew Avatar answered Nov 14 '22 14:11

Andrew


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.

like image 32
Dirk Eddelbuettel Avatar answered Nov 14 '22 14:11

Dirk Eddelbuettel


This may sound odd, but do you have McAfee anti-virus? It turns out that McAfee was preventing the correct installation of 'Rcpp' and 'BH' on my computer (check out this forum for more details: https://github.com/hadley/dplyr/issues/2002). I just temporarily disabled McAfee and installed the package I needed. Worked like a charm.

like image 43
Billy Raseman Avatar answered Nov 14 '22 12:11

Billy Raseman