看板 R_Language 關於我們 聯絡資訊
[問題敘述]: 我自己寫一隻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 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 58.114.4.176 ※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1472353304.A.AE4.html
Wush978: 放github上後用devtools::install_github就會自動裝 08/28 17:36
Wush978: dependencies 08/28 17:37