>>>>> "Jennifer" == Jennifer Lai <lai at
lindaspaces.com>
>>>>> on Thu, 27 Apr 2006 15:36:04 -0400 writes:
Jennifer> Hi,
Jennifer> How do I document setReplaceMethod, such as this,
Jennifer> setGeneric("x<-", function(.Object, value)
Jennifer> standardGeneric("myMethod<-"))
the above looks wrong.
I assume you want
setGeneric("x<-", function(.Object, value)
standardGeneric("x<-"))
??
Jennifer> setReplaceMethod("x", "myClass",
Jennifer> function(.Object, value) {
Jennifer> .Object at x <- value
Jennifer> .Object
Jennifer> }
Jennifer> )
Jennifer> in the NAMESPACE file?
well, the NAMESPACE is not for documentation, but for importing
and exporting of R symbols (or "objects" if you like).
So I assume you that you want to make
x(........) <- ........
abvailable, i.e. export it?
I didn't try, but I think
exportMethods("x<-") # name of the generic, as with other
methods
should work.
Regards,
Martin Maechler, ETH Zurich