[英]Have trouble installing ggExtra in RStudio
When I try to library "ggExtra" in RStudio with code below: 当我尝试在RStudio中使用以下代码存储“ ggExtra”库时:
install.packages("ggExtra")
what displayed is: 显示的是:
Warning in install.packages :
unable to access index for repository
https://cran.rstudio.com/src/contrib:
cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
Warning in install.packages :
unable to access index for repository
http://www.stats.ox.ac.uk/pub/RWin/src/contrib:
cannot open URL
'http://www.stats.ox.ac.uk/pub/RWin/src/contrib/PACKAGES'
Installing package into ‘C:/Users/Kyrie NI/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
I also tried: 我也尝试过:
install.packages("devtools")
devtools::install_github("daattali/ggExtra")
And I received the same results. 我收到了相同的结果。 What is wrong with my operation, or the package?
我的操作或包装有什么问题?
I had a similar problem using R 3.5.0, and found an online solution working as following. 我在使用R 3.5.0时遇到了类似的问题,并发现了一个在线解决方案,其工作方式如下。 It seems I needed to set a default CRAN mirror by adding the first line.
似乎我需要通过添加第一行来设置默认的CRAN镜像。 Then I update my R into version 3.5.1 to be able to library it.
然后,我将我的R更新到版本3.5.1,以便能够对其进行存储。 I hope it helps you too.
希望对您有帮助。
options(repos = c(CRAN = "http://cran.rstudio.com"))
install.packages("ggExtra")
The original idea comes from: https://support.rstudio.com/hc/en-us/community/posts/205198138-packages-installation-problem 最初的想法来自: https : //support.rstudio.com/hc/en-us/community/posts/205198138-packages-installation-problem
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.