0

My script using several packages was working fine until last friday. I did an update or all the packages (I work with RStudio) and now I can open some of the packages.

For examples for plyr and dplyr.

I have as settings:

.libPaths()
[1] "C:/Users/florent/Documents/R/win-library/3.3" "C:/Program Files/R/R-3.3.1/library"     

 When I do 
install.packages("plyr")
library("plyr")

I get:

Installing package into ‘C:/Users/florent/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
also installing the dependency ‘Rcpp’

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/Rcpp_0.12.7.zip'
Content type 'application/zip' length 3265128 bytes (3.1 MB)
downloaded 3.1 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/plyr_1.8.4.zip'
Content type 'application/zip' length 1183174 bytes (1.1 MB)
downloaded 1.1 MB

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

The downloaded binary packages are in
    C:\Users\florent\AppData\Local\Temp\3\RtmpiWaBed\downloaded_packages
> library("plyr")
Error in library("plyr") : there is no package called ‘plyr’

So then I give the directory where to install the packages, and I try to open it again:

 install.packages("plyr", lib="C:/Users/florent/Documents/R/win-library/3.3")
library("plyr", lib.loc="C:/Users/florent/Documents/R/win-library/3.3")

I have:

> install.packages("plyr", lib="C:/Users/florent/Documents/R/win-library/3.3")
also installing the dependency ‘Rcpp’

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/Rcpp_0.12.7.zip'
Content type 'application/zip' length 3265128 bytes (3.1 MB)
downloaded 3.1 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/plyr_1.8.4.zip'
Content type 'application/zip' length 1183174 bytes (1.1 MB)
downloaded 1.1 MB

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

The downloaded binary packages are in
    C:\Users\florent\AppData\Local\Temp\3\RtmpiWaBed\downloaded_packages
> library("plyr", lib.loc="C:/Users/florent/Documents/R/win-library/3.3")
Error in library("plyr", lib.loc = "C:/Users/florent/Documents/R/win-library/3.3") : 
  there is no package called ‘plyr’
> 

This is very strange. I ambit lost why I can not get these 2 packages back, but I can get all the others!

Suggestions are welcome!

Floni
  • 475
  • 2
  • 13
  • 1
    Do you have multiple R sessions running? Maybe [this post](http://stackoverflow.com/questions/26570912/error-in-installation-a-r-package) is helpful? – zx8754 Oct 11 '16 at 08:33
  • Did you try starting from a "clean" Rstudio session (that is, no packages loaded) ? – lbusett Oct 11 '16 at 08:33
  • 1
    @zx8754, I have 2 other sessions running and using these packages... I will wait until they are done, but following the other post it could be the reason! Lorenzo Busetto, I can try this! – Floni Oct 11 '16 at 08:39
  • Other helpful posts: [here](http://stackoverflow.com/questions/25695355) and [here](http://stackoverflow.com/questions/25721884). – zx8754 Oct 11 '16 at 08:42

0 Answers0