Despite the fact that there are a lot of messages on such topics, none of them helped me understand how to configure the DESCRIPTION file in package R.
My questions:
1.) Is my description file correct? Did I use the "depends" and the "imports" correctly? (maybe a duplicate question ...)
2.) Are the required packages (dependencies?) Automatically installed with my package as needed or are "downloaded" when one of my package functions should reference the function of the imported package? (haven't found anything yet about this ...)
I tried to send the packet to CRAN and received the following feedback:
- checking package dependencies ... NOTE. Depends: includes non-default packages: “MASS” car “alien” ggplot2 'lmtest' plyr 'reshape2' scales Adding so many packages to the search path is excessive, and it is preferable to selectively import.
I originally listed all of the above packages in the dependency section of the DESCRIPTION file. In the NAMESPACE file, I used import(pkgName)
for all the packages listed above.
After that, I updated my files with the help importFrom(pkgName, function)
in the NAMESPACE file and moved most of the packages to the import section of my DESCRIPTION file. Checking a package with the current version of R-devel no longer gives this note. Here is an excerpt from my DESCRIPTION file:
License: GPL-3
Depends:
ggplot2
Imports:
MASS,
car,
foreign,
lmtest,
plyr,
reshape2,
scales
Collate:
'sjImportSPSS.R'
and the NAMESPACE file:
import(ggplot2)
importFrom(MASS,lda)
importFrom(MASS,loglm)
importFrom(car,crPlots)
importFrom(car,durbinWatsonTest)
importFrom(car,influencePlot)
importFrom(car,leveragePlots)
importFrom(car,ncvTest)
importFrom(car,outlierTest)
importFrom(car,spreadLevelPlot)
importFrom(car,vif)
importFrom(foreign,read.spss)
importFrom(lmtest,bptest)
importFrom(plyr,adply)
importFrom(plyr,ddply)
importFrom(reshape2,melt)
importFrom(scales,brewer_pal)
importFrom(scales,percent)
, , . , library(sjPlot)
, ggplot2, . - ? , ?