[英]How include a requried packages inside my own package in R?
I built my own package and everything is working well. 我构建了自己的程序包,并且一切正常。 However, I need to load another packages when I load my package.
但是,加载程序包时需要加载另一个程序包。 That is, I want R loads all requires packages automatically when I load my package like this:
也就是说,当我像这样加载我的包时,我希望R自动加载所有需要的包:
library(mypackage)
loading requrie packages:
first package
second package
Is there any easy way? 有什么简单的方法吗?
Add them in your DESCRIPTION
file, section Depends
. 将它们添加到您的
DESCRIPTION
文件的Depends
部分中。
Depends:
first package,
second package
You should read the book R Packages . 您应该阅读R Packages一书。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.