[R] strange behaviour of importFrom directive in name space

Florian Hahne f.hahne at dkfz-heidelberg.de
Thu Apr 28 15:53:25 CEST 2005


Dear listers,
After activating the name space for my bioconductor package (prada) I
successfully ran R CMD check. However when loading the package in R and
running the examples the imported function brewer.pal from package
RColorBrewer is not found. I can directly call brewer.pal from the
RColorBrewer name space typing RColorBrewer::brewer.pal, but it is not
imported into my prada name space. When I attach RColorBrewer, the
example runs fine. For several other function from different packages
the import works without problems.
I'm quite puzzled how this import can work with R CMD check but not when
attaching the package in a "regular" R session. And if the importFrom
directive was corrupted, shouldn't there be an error message?
This is not realy a problem, since I can load RColorBrewer by putting it
into the dependent field in my DESCRIPTION file as I did before, but
none the less I wanted to mention this strange behaviour. Could it be a
bug?
Regards,   
Florian

Here is my NAMESPACE file:
export("analysePlate", "as.all",
       "barploterrbar", "combineFrames",
       "csApply", "ddCt",
       "densCols", "eListWrite",
       "fitNorm2", "getPradaPar",
       "histStack", "plotNorm2",
       "plotPlate", "readCytoSet",
       "readFCS", "readSDM",
       "removeCensored", "setPradaPars",
       "smoothScatter", "thresholds")


importFrom("KernSmooth", "bkde2D")
importFrom("RColorBrewer", "brewer.pal")
importFrom("utils", "getFromNamespace", "assignInNamespace")
importFrom("MASS", "cov.rob") 
S3method("$", "cytoFrame")
exportClasses("cytoFrame", "cytoSet")
exportMethods("colnames", "colnames<-",
              "description", "description<-",
              "exprs", "exprs<-",
              "length", "[", "[[", "[[<-",
              "pData", "phenoData", "phenoData<-",
              "show")

System:
R 2.1.0 on Suse9.2 Linux box


-- 
Florian Hahne <f.hahne at dkfz-heidelberg.de>




More information about the R-help mailing list