[Rd] Questions about name space directives
sfalcon at fhcrc.org
Tue May 1 22:31:39 CEST 2007
I'm hoping to get some clarification of the intent of some of
directives used in NAMESPACE files.
1. Is import(somePkg) also intended to import all classes and methods
that are exported via exportClasses and exportMethods in somePkg?
I think import pulls in classes and methods, but it isn't clear
from the docs whether this is as intended.
2. What is exportMethods intended to do? I'm confused about when/if
exportMethods deals with a generic function vs method(s) for a
a) In a package that defines a generic function "foo" via
setGeneric, it seems to be sufficient to use
exportMethods("foo") to export the generic (and any methods
defined). Is this as intended or should the author add an
export("foo") directive to explicitly export the generic
b) In a package that only sets methods on generic "foo", an
exportMethods("foo") directive does not re-export the "foo"
generic. I find it confusing that exportMethods sometimes
exports the generic and sometimes not. The generic can be
re-exported using export().
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
More information about the R-devel