0
votes

I am unable to install the package "rcpp" in R Studio even though it was executed successfully. When I try to load the sasme library, it doesnt show me in the list of installed libraries.

install.packages("Rcpp") Installing package into ‘C:/Users/sk/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/Rcpp_1.0.4.6.zip' Content type 'application/zip' length 3030990 bytes (2.9 MB) downloaded 2.9 MB

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

library(Rcpp) Error in library(Rcpp) : there is no package called ‘Rcpp’

1
The troublesome part of the error message is the "cannot remove prior installation". See if the suggestions at stackoverflow.com/questions/26570912/… help. This doesn't seem specific to Rcpp.MrFlick
Hi @MrFlick: Thank you! I closed all the R studio sessions as well as deleted the LOCK file as mentioned in the link you posted.Shafia Kauser

1 Answers

0
votes

I was able to install by downloading the .tar.gz file from the archive link: https://cran.r-project.org/src/contrib/Archive/Rcpp/ and installing this instead of directly from CRAN.

I had to install a few other libraries which were dependent on this library as well.