我很困惑。我已经做了十几次这个过程,从来没有遇到过这个问题。
我为 Ubuntu 安装了最新版本的 R
我输入R,一点问题都没有,给我最新版本,我可以加载原生包。
但是当我尝试安装新软件包时,它们会下载,但我什么也没得到。例如,如果我安装 ggplot2:
> install.packages("ggplot2")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
also installing the dependencies ‘colorspace’, ‘stringr’, ‘RColorBrewer’, ‘dichromat’, ‘munsell’, ‘labeling’, ‘plyr’, ‘digest’, ‘gtable’, ‘reshape2’, ‘scales’, ‘proto’
trying URL 'http://rweb.quant.ku.edu/cran/src/contrib/colorspace_1.2-4.tar.gz'
Content type 'application/x-gzip' length 242791 bytes (237 Kb)
opened URL
==================================================
downloaded 237 Kb
trying URL 'http://rweb.quant.ku.edu/cran/src/contrib/stringr_0.6.2.tar.gz'
Content type 'application/x-gzip' length 20636 bytes (20 Kb)
opened URL
==================================================
downloaded 20 Kb
[snip ... ]
trying URL 'http://rweb.quant.ku.edu/cran/src/contrib/ggplot2_0.9.3.1.tar.gz'
Content type 'application/x-gzip' length 2330942 bytes (2.2 Mb)
opened URL
==================================================
downloaded 2.2 Mb
The downloaded source packages are in
‘/tmp/RtmpoPUAFL/downloaded_packages’
> library(ggplot2)
Error in library(ggplot2) : there is no package called ‘ggplot2’
我已经多次完全清除文件,但运气不佳。
我以 root 身份登录。
我觉得我错过了一些明显的东西?我不知道——我在 Ubuntu、Mac、Windows 和 Debian 上做过十几次同样的事情。帮助?