2012-03-08 120 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