[Rd] Possible bug in base::namespaceImportFrom?

From: Seth Falcon <sfalcon_at_fhcrc.org>
Date: Fri 22 Sep 2006 - 04:52:00 GMT


Hi,

namespaceImportFrom in base/R/namespace.R has the following:

       fdef <- methods:::getGeneric(genName, impenv)

The definition of getGeneric is in methods/R/RMethodUtils.R starts with:

    getGeneric <-
## return the definition of the function named f as a generic.

      ##

## If there is no definition, throws an error or returns
## NULL according to the value of mustFind.
function(f, mustFind = FALSE, where = .genEnv(f, topenv(parent.frame()), package), package = "")

I think the call to getGeneric in namespaceImportFrom should use named arguments because impenv, an environment, will be assigned to the mustFind arg which is most likely not desired.

An example where this seems to show up is in the check reports for GOstats:

   http://bioconductor.org/checkResults/1.9/gopher5-GOstats-checksrc.html

Here's the snip from the check output (the results may have been updated in the meantime):

I'm having trouble reproducing it on my local system, but thought I would bring it to the team's attention.

Best,

+ seth



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri Sep 22 14:54:18 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 22 Sep 2006 - 08:30:08 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.