【问题标题】:RStudio R-package check note about missing repository关于缺少存储库的 RStudio R 包检查说明
【发布时间】:2015-11-08 18:21:27
【问题描述】:

问题

当我使用 RStudio 提供的包检查时,我总是得到注释(这是唯一的注释),没有设置存储库,因此跳过了循环依赖检查。 但是,如果我直接调用,我不会收到此注释

devtools::check(args = c('--as-cran'))

在 R 中,即使执行相同的代码。有人对这个问题有解释吗?

系统信息

  • 平台:x86_64-pc-linux-gnu(64 位)
  • 操作系统:Ubuntu 15.04
  • R 版本 3.2.1
  • RStudio 版本 0.99.473
  • 开发工具 1.8.0
  • 通过options(repos = c(CRAN="https://cran.rstudio.com")) 在.Rprofile 中设置存储库

【问题讨论】:

    标签: r rstudio devtools r-package


    【解决方案1】:

    相同的 Ubuntu 15.04 平台和 R 版本等 pp -- 但我在 Rprofile.site 中设置了它,并且从未收到有关缺少循环依赖的注释:

    ## Example of Rprofile.site
    local({
        r <- getOption("repos")
        r["CRAN"] <- "http://cran.rstudio.com"
        r["eddelbuettel"] <- "http://eddelbuettel.github.io/drat"
        r["ghrr"] <- "http://ghrr.github.io/drat"
        options(repos = r)
    })
    

    我在这里使用了两个额外的 drat 存储库,但这当然是完全可选的。

    (顺便说一句,这个问题像很多人一样被标记为“RStudio”,但据我所知,这与你从哪里调用 R 无关:无论是 RStudio、ESS 还是命令行。)

    【讨论】:

    • 感谢您的回答,德克。将相应的行添加到 Rprofile.site 并没有改变 RStudio 显示提到的注释。此外,选项 'repos' 已按应有的方式设置。似乎在 RStudio 中检查包不是直接在 R 中检查包。
    • 耸耸肩——正如我所说,这一切都适用于我在 RStudio、ESS 或命令行中。不过我不使用 devtools,所以也许可以不使用它。
    猜你喜欢
    • 2013-10-25
    • 1970-01-01
    • 1970-01-01
    • 2023-02-24
    • 1970-01-01
    • 1970-01-01
    • 2016-12-29
    • 1970-01-01
    • 2021-04-30
    相关资源
    最近更新 更多