我刚刚下载了新版本的R和Rstudio,但是当我尝试通过Rstudio界面安装ggplot2时,出现了以下错误消息。是否有其他方法?
> install.packages("ggplot2")
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/src/contrib
Warning in install.packages :
package ‘ggplot2’ is not available (for R version 3.2.1)
Installing package into ‘/Users/tom.glaser/Library/R/3.2/library’
(as ‘lib’ is unspecified)
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/src/contrib
Warning in install.packages :
package ‘ggplot2’ is not available (for R version 3.2.1)
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/bin/macosx/contrib/3.2
Warning message:
package ‘ggplot2’ is not available (for R version 3.2.1)
我的会话信息是:
> sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
Running under: OS X 10.8.5 (Mountain Lion)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.2.1
我不知道是否有意义,但我尝试了许多其他软件包,包括psych和Hmisc,也遇到了类似的问题。我成功安装了dplyr(版本0.4.2)。我试图回到较早版本的R,但我发现的Mac版本太老了: https://cran.r-project.org/bin/macosx/old/index-old.html