【问题标题】:Have trouble installing ggExtra in RStudio在 RStudio 中安装 ggExtra 时遇到问题
【发布时间】:2018-02-03 10:19:53
【问题描述】:

当我尝试使用以下代码在 RStudio 中库“ggExtra”时:

    install.packages("ggExtra")

显示的是:

    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)

我也试过了:

    install.packages("devtools")
    devtools::install_github("daattali/ggExtra")

我收到了同样的结果。我的操作或包裹有什么问题?

【问题讨论】:

标签: r ggplot2


【解决方案1】:

我在使用 R 3.5.0 时遇到了类似的问题,并找到了一个在线解决方案,如下所示。看来我需要通过添加第一行来设置默认的 CRAN 镜像。然后我将我的 R 更新到版本 3.5.1 以便能够将其库化。希望对你也有帮助。

   options(repos = c(CRAN = "http://cran.rstudio.com"))
    install.packages("ggExtra")

最初的想法来自: https://support.rstudio.com/hc/en-us/community/posts/205198138-packages-installation-problem

【讨论】:

  • ggExtra 未在此处安装。我已经尝试过您的建议,但我仍然收到以下错误消息:错误:无法删除先前安装的软件包“htmltools”执行停止
  • 手动删除包含htmltoolsrlang的文件夹后,我终于可以安装ggExtra了。跨度>
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2018-01-27
  • 1970-01-01
  • 1970-01-01
  • 2014-09-11
  • 2013-12-24
  • 2020-02-27
  • 2018-02-25
相关资源
最近更新 更多