2013-03-19 33 views
1

我已经查看了许多有关ggplot2安装的主题,但没有遇到我的问题。无法从库中安装ggp​​lot2,也不支持.zip

我正在使用R studio版本0.97.332。我已经安装sm和extremevalues没有任何问题,但我无法安装ggp​​lot2。

我试过以下两种方式,它们都不起作用。

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’ 

我已手动删除GGPLOT2的任何破坏(?)的文件夹,但这并没有工作,要么 也没有手动移动文件夹的工作。

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 

我已经试过同样的方法来安装corrplot,这也不能工作。

任何帮助,将不胜感激,我已经尝试了很多次,现在...

回答

1

我没有使用Windows的权利,但现在看来似乎可能是一个权限问题。你是否试过以管理员身份启动R并运行install.packages(“ggplot2”)?

+0

安装包,现在我已经把文件放在C:这似乎工作// Temp文件夹! – Fred 2013-03-21 14:36:45

0

这可能是daj注意到的权限问题。我发现这个问题可以通过手动创建目标文件夹来绕过。在这种情况下,创建一个名为ggplot2文件夹:

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

然后尝试再次R.