Question

In trying to create a local R package, I listed some dependent packages as Depends:

...
Description: NA
License: GPL-2
Depends:R (>= 2.15.0),
    survival,
    PropCIs,
    boot,
    msm,
    reshape2
LazyData: true

But I got these message by run R CMD check:

 *checking dependencies in R code ... NOTE
Packages in Depends field not imported from:
  ‘PropCIs’ ‘boot’ ‘msm’ ‘reshape2’ ‘survival’
  These packages need to be imported from (in the NAMESPACE file)
  for when this namespace is loaded but not attached.

Then I use manually added these packages to NAMESPACE file, but it does work and the import lines were deleted automatically after checking.

Another weird thing is the checking process showed:

R CMD check succeeded

But the files then disappeared or deleted systematically/automatically.

May somebody know the reasons?

Was it helpful?

Solution

Just add the following lines to your roxygen code:

@import PropCIs boot msm reshape2 survival
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top