I am trying to build a package (GWASTools, submitted to Bioconductor) that uses the "sandwich" package. I have references to "sandwich" in DESCRIPTION:
Imports: methods, DBI, RSQLite, sandwich, survival, DNAcopy

and NAMESPACE:
import(sandwich)

In the code itself is a call to vcovHC:
Vhat <- vcovHC(mod, type="HC0")

I have sandwich version 2.2-7 installed.

When I run R CMD check on my package, I get the following error during checking of examples:
* using R Under development (unstable) (2011-08-29 r56828)
* using platform: x86_64-apple-darwin9.8.0 (64-bit)
...
* checking examples ... ERROR
...
Error in estfun.glm(x) : could not find function "is.zoo"
Calls: assocTestRegression ... meatHC -> rowMeans -> is.data.frame -> estfun -> estfun.glm

I import sandwich, sandwich depends on zoo, but a function in zoo cannot be found during execution.

I tried to get around this by explicitly including a "require" statement in assocTestRegression:
require(sandwich)

The example now runs, but I have a warning in R CMD check:
* checking for unstated dependencies in R code ... WARNING
‘library’ or ‘require’ call not declared from: ‘sandwich’

I am not sure why this is a problem, as there is a "require" statement (for a different package) in another function which does not cause any warnings.

Can anyone advise on how to get my package to successfully pass R CMD check?

thanks,
Stephanie Gogarten
Research Scientist, Biostatistics
University of Washington

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to