Skip to content
Prev 42087 / 63435 Next

S4 NAMESPACE method imports and exports do not include (promoted?) generics

The key point here is that setGeneric("unique") is done that way, 
without other argument, whoever does it.  That creates the generic from 
the implicit generic corresponding to base::unique.  If package A had 
done anything else, the resulting methods tables would NOT refer to 
package "base" but to package "PkgA" and it's that version of the 
generic that would need to be imported.

So it's not particularly relevant that we're dealing with PkgA::unique() 
if the generic function was created from base::unique by the standard 
call.  That's what would make an automatic imputation of the generic 
from importMethods() possible.
On 12/16/11 2:57 PM, Martin Morgan wrote: