1

I have looked at many topics regarding the installation of ggplot2, but haven't encountered my problem.

I'm using R studio version 0.97.332. I have already installed sm and extremevalues without any problems, but I'm unable to install ggplot2.

I have tried the following two ways and neither one of them works.

install.packages("C:\\Temp\\ggplot2_0.9.3.1.zip", repos=NULL,                   
lib.loc="...\Documents\\R\\win-library\\2.15")
Installing package(s) into ‘...\Documents/R/win-  
library/2.15’ (as ‘lib’ is unspecified)
inferring 'repos = NULL' from the file name
package ‘ggplot2’ successfully unpacked and MD5 sums checked
Warning in install.packages :
  unable to move temporary installation         
‘\\..\Documents\R\win-
library\2.15\file15c06ecb4488\ggplot2’ to         
‘\\...\Documents\R\win-library\2.15\ggplot2’

I have manually deleted any corrupted(?) folder of ggplot2, but this didn't work either Nor did manually moving the folder worked.

install.packages("ggplot2")
Installing package(s) into ‘\\.../Documents/R/win-        
library/2.15’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/bin/windows/contrib/2.15/ggplot2_0.9.3.1.zip'
Content type 'application/zip' length 2665534 bytes (2.5 Mb)
opened URL
downloaded 2.5 Mb

    package ‘ggplot2’ successfully unpacked and MD5 sums checked
    Warning in install.packages :
      unable to move temporary installation         
    ‘\\...\Documents\R\win-
    library\2.15\file15c0758038ea\ggplot2’ to 
    ‘\\...\Documents\R\win-library\2.15\ggplot2’

    The downloaded binary packages are in
C:\Users\...\AppData\Local\Temp\RtmpmocnrL\downloaded_packages

I have tried the same approach to install corrplot, which didn't work either.

Any help would be appreciated, I have tried it many times now...

Julius Vainora
  • 47,421
  • 9
  • 90
  • 102
Fred
  • 11
  • 2

2 Answers2

1

I'm not using windows right now, but it seems like it could be a permissions issue. Have you tried starting R as administrator and running install.packages("ggplot2")?

daj
  • 6,962
  • 9
  • 45
  • 79
0

This is likely a permissions issue as daj notes. I find that this issue can be circumvented by manually creating the destination folder. In this case, create a folder named ggplot2 in:

\\...\Documents\R\win-library\2.15\

Then try again to install package in R.

user1893148
  • 1,990
  • 3
  • 24
  • 34