Thanks, Martin! It worked. With other methods I didn't have to quote the 
function name to export them in the NAMESPACE file. But with 
replaceMethod, I have to quote the function name without getting any 
error during package build time.  Thanks!

Regards,
Jennifer

Martin Maechler wrote:

>>>>>>"Jennifer" == Jennifer Lai <[EMAIL PROTECTED]>
>>>>>>    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
>  
>
You are right. It was a typo.

> setGeneric("x<-", function(.Object, value) standardGeneric("x<-"))
>
>??
>
>    Jennifer> setReplaceMethod("x", "myClass",
>    Jennifer>   function(.Object, value) {
>    Jennifer>  [EMAIL PROTECTED] <- 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
>  
>

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to