[Rd] Questions about name space directives

From: Seth Falcon <sfalcon_at_fhcrc.org>
Date: Tue, 01 May 2007 13:31:39 -0700


Hi,

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 generic function.
    1. 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 function?
    2. 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

-- 
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
http://bioconductor.org

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Tue 01 May 2007 - 21:12:37 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 02 May 2007 - 09:33:40 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.