When I am writing an R package, there are several packages that I listed as Import instead of Depend.
My question is that, when people are installing my package from source, i.e. install.packages('pkgNmae', repo=NULL, type="source"), and their computer does not have the necessary packages I imported pre-installed, will the command install.packages recognize this? Will the user be able to use my package after installation?
I am not sure if I list these packages in Import they’ll be automatically installed if needed. Thanks!
Yes, they will be automatically installed if needed. Imports and depends are identical for the purpose of installation – they only differ in their package-load-time behaviour.