0
votes

I have been installing packages into R since the day I downloaded it. Version 3.4.1. Today it gave me an issue when I tried to install a new package, SLOPE that had me update and reboot R. I said okay. However, in doing so I then went to call packages using the library and it told me:

> Error: package or namespace load failed for ‘plyr’ in loadNamespace(j
> <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):  there
> is no package called ‘Rcpp’

I have clicked around on here and it looks like I need to download and install the Rccp package. I tried that and got this answer:

install.packages("Rcpp") Installing package into ‘\tgdcfs01/Users/jsmith/Documents/R/win-library/3.4’ (as ‘lib’ is unspecified) trying URL 'https://mran.microsoft.com/snapshot/2017-09-01/bin/windows/contrib/3.4/Rcpp_0.12.12.zip' Content type 'application/zip' length 3319164 bytes (3.2 MB) downloaded 3.2 MB

package ‘Rcpp’ successfully unpacked and MD5 sums checked Warning in install.packages : cannot remove prior installation of package ‘Rcpp’

The downloaded binary packages are in C:\Users\jsmith\AppData\Local\Temp\RtmpYHBW2f\downloaded_packages

So then I tried uninstalling Rccp and got this message:

 remove.packages(Rcpp)
Error in remove.packages : object 'Rcpp' not found

What am I missing?

1
Should it be remove.packages("Rcpp")?Lyngbakr
Welcome to SO! Try 'Rcpp'. R is looking for an object called Rcpp, a variable in your environment. Also, there seems to be some confusion with the lib paths. If you type .libPaths(), R will show you all the possible locations of installed packages... that may provide some additional cluescsgroen
Okay so I have 2 file paths when I call .libPaths() One is on my C drive and the other is listed above as the tgdcfs01.... None of them have the Rcpp package installed. The C drive is not writable. The other drive states package Rcpp successfully unpacked, but warning in install.packages: cannot remove prior installation of package Rcpp. Then it states the downloaded binary packages are in a Temp folder in downloaded_packages on my C Drive.user10264295
Try restarting R. On Windows, updating packages if they've already been loaded can cause problems and I suspect that may be happening here. Start R, look at sessionInfo() and make sure Rcpp isn't loaded. Then try remove.packages("Rcpp") and install.packages("Rcpp") in sequence.Thomas

1 Answers

0
votes

In order to fix it, I in fact did not update R in the first place. I needed to do the following:

install.packages("installr")
library(installr)
updateR()

Then I updated R, but I did not use the recommended setting of using R Gui. Then I was able to re-install packages and go from there.