2012-03-08 119 views
10

尝试安装GGPLOT2当我收到以下错误安装GGPLOT2:无法在Ubuntu 11.10

> install.packages("ggplot2") 
Installing package(s) into ‘/home/dodo/R/x86_64-pc-linux-gnu-library/2.13’ 
(as ‘lib’ is unspecified) 
--- Please select a CRAN mirror for use in this session --- 
Loading Tcl/Tk interface ... done 
Warning message: 
In getDependencies(pkgs, dependencies, available, lib) : 
package ‘ggplot2’ is not available (for R version 2.13.1) 

我运行Ubuntu 11.10(maverick中)。

任何帮助表示赞赏。

回答

16

此版本需要R(> = 2.14.0)。

所以请去看看instructions at CRAN to upgrade on Ubuntu to the current R,一旦你有R 2.14.2启动和运行(这是一个四到五个命令的问题,感谢apt-get和朋友的魔力,升级到当前的ggplot2。

+0

谢谢,这工作。 – DodoD 2012-03-08 01:38:09

+0

+1谢谢Dirk。使用RStudio Server的人特别感兴趣! – 2012-07-23 14:57:36

+0

+1令人惊叹,它解决了我在Ubuntu上使用RStudio Server和ggplot2的问题。谢谢! – 2012-11-26 14:10:28

2

ggplot2-0.9.0对R> = 2.14(以及隐含的R> = 2.14.1)具有明确的依赖关系。因此它不能安装在R 2.13.1版本中。也许你可以从档案中获得以前的版本(0.8.9)并安装它。

2

你需要安装一个适合你的老版本R的版本,或者你需要升级。要走第一条路线,你应该在Archives中找到一个ggplot2版本,然后从源代码安装(这是我相信,Linux的默认)也许尝试加州大学洛杉矶分校CRAN镜:

http://cran.stat.ucla.edu/src/contrib/Archive/ggplot2/ggplot2_0.8.9.tar.gz

+1

谢谢,这有助于命令:“R CMD INSTALL ggplot2_0.8.9.tar.gz” – link0ff 2012-08-09 15:49:40