我正在编写R包,并在DESCRIPTION文件中编写:
Imports: stringr,splitstackshape
在NAMESPACE文件中:
import(splitstackshape)
import(stringr)
但是当我在本地加载这个包时:
install.packages("~/Desktop/DCR_0.1.0.tar.gz", repos = NULL, type =
"source")
ERROR: dependency ‘stringr’ is not available for package ‘DCR’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/DCR’
那么,当我用.gz文件安装包时,如何让它自动加载依赖包?