[问题叙述]:
我自己写一只package,会用到其他人的package,
于是在project的description这个档案里填上Depends: ...
我知道如果是从cran下载来的pkgs可以在dependencies选择要不要装需要的pkgs
但如果没打算上传cran,就是用zip传给人家装
install.packages(..., dependencies="Depends") 就不太成功,
看了说明换成NA或TRUE其他的都不行
Google了一下,不多这样的问题,而且有些时间了
http://stackoverflow.com/questions/4090169/
elegant-way-to-check-for-missing-packages-and-install-them
http://stackoverflow.com/questions/14171148/
how-to-tell-cran-to-install-package-dependencies-automatically
我以为可以更简单的解决.
例如require(mylib) 之中设定个参数. 但好像没有找到
[环境叙述]:
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=Chinese (Traditional)_Taiwan.950
[2] LC_CTYPE=Chinese (Traditional)_Taiwan.950
[3] LC_MONETARY=Chinese (Traditional)_Taiwan.950
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Traditional)_Taiwan.950
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.3.1
[关键字]:
install.package dependencies