Skip to content
Prev 39340 / 63421 Next

changes in recent R-devel revisions?

On 03/01/2011 03:19 PM, Benilton Carvalho wrote:
For what it's worth, saying
prior to library(oligoClasses) leads to

 7: loadNamespace(package, c(which.lib.loc, lib.loc), keep.source =
keep.source
 8: methods:::cacheMetaData(ns, TRUE, ns)
 9: getGeneric(f, FALSE, searchWhere, fpkg)
10: tryCatch(loadNamespace(package), error = function(e) e)

where 'package' is oligoClasses in lines 7 and 10, and the 'f' in 9 is
'relocateObject'. Line 10 is evaluated when methods:::.getGeneric
returns NULL.

In oligoClasses we have

oligoClasses/R> grep relocateObject *
AllGenerics.R:setGeneric("relocateObject", function(object, ...)
standardGeneric("relocateObject"))
methods-CNSet.R:relocateObject <- function(object, to){

which I guess is not as intended.

My guess is that setGeneric adds the generic to a cache of some sort
when the name space is created, but doesn't remove it when the generic
is overwritten by a plain function.

No idea why this shows up in the current R revision.

Martin