简体   繁体   English

R CMD检查pkg-离线

[英]R CMD check pkg --offline

Any way to prevent check process trying to connect to network? 有什么方法可以防止检查过程尝试连接到网络?
Something like --offline argument to R CMD check . R CMD check --offline参数之类的东西。

* checking CRAN incoming feasibility ...Warning: unable to access index for repository http://CRAN.R-project.org/src/contrib
Warning: unable to access index for repository http://bioconductor.org/packages/3.1/bioc/src/contrib
Warning: unable to access index for repository http://bioconductor.org/packages/3.1/data/annotation/src/contrib
Warning: unable to access index for repository http://bioconductor.org/packages/3.1/data/experiment/src/contrib
Warning in url(sprintf("%s/src/contrib/PACKAGES.gz", u), "rb") :
  unable to resolve 'CRAN.R-project.org'
NB: need Internet access to use CRAN incoming checks

R CMD check --help does not list such feature. R CMD check --help未列出此类功能。

You can remove the --as-cran option, since checking the CRAN incoming feasibility only happens when that option is turned on. 您可以删除--as-cran选项,因为仅在打开该选项时才检查CRAN传入的可行性。

Otherwise there is no way to disable it, since the CRAN check requires verifying the existing CRAN status with respect to some things with packages or your package. 否则,没有办法禁用它,因为CRAN检查需要针对软件包或软件包中的某些内容验证现有CRAN状态。 See the section Checking CRAN incoming feasibility in http://r-pkgs.had.co.nz/check.html for details. 有关详细信息,请参见http://r-pkgs.had.co.nz/check.html中的“ 检查CRAN传入可行性 ”部分。

In the recent R version 3.4.0 it is possible as described in NEWS file: 在最新的R版本3.4.0中,有可能如NEWS文件中所述:

Running R CMD check --as-cran with _R_CHECK_CRAN_INCOMING_REMOTE_ false now skips tests that require remote access. 现在,使用_R_CHECK_CRAN_INCOMING_REMOTE_ false运行R CMD check --as-cran会跳过需要远程访问的测试。 The remaining (local) tests typically run quickly compared to the remote tests. 与远程测试相比,其余(本地)测试通常可以快速运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM