[Bioc-devel] warning in R CMD check
ALEXANDRE SANCHEZ PLA
asanchez at ub.edu
Wed Mar 19 13:48:49 CET 2008
Hello
I am trying to build a package to upload it to Bioconductor-
The package builds correctly using R-2.6.2 and Bioconductor 2.1 but R CMD check
issues the following warning:
--------------------------------------------------------------
* checking for unstated dependencies in R code ... WARNING
'library' or 'require' calls not declared from:
anotPkg anotPack
See the information on DESCRIPTION files in the chapter 'Creating R
packages' of the 'Writing R Extensions' manual.
---------------------------------------------------------------
'anotPkg' or 'anotPack' are not package names indeed. I use them as argument
to pass any annotation package names to a function which will load them in
execution time.
It is as if I wanted to have a 'loadAnnotations' function in my package which
could be as follows:
loadAnnotations <- function (anotPack){
if (!require(anotPack, character.only=T))
cat("Could not load the package")
}
So my question is: what should I do if I wanted to include such a function in my
package to avoid the warning?
Thanks for any suggestions
Alex Sanchez
Departament d'Estadistica. Universitat de Barcelona
More information about the Bioc-devel
mailing list