No, I'd recommend to work with the sources directly, or if you really want to do it from command line, you can access with ?getMethod

Uwe Ligges

On 21.07.2010 14:36, Albert-Jan Roskam wrote:
Hi R experts,

The fix() function canbe used to edit normal functions. I would like to know 
whether it's also possible to use something similar to edit a method of an S4 
class. In other words, is there a fix-like function that allows me to edit 
method definitions without having to go back to the source code?

setGeneric (name="doStuff",def = function(object){standardGeneric("doStuff")})
setClass("SomeClass", representation(text = "character"))
setMethod(f = "doStuff", signature ("SomeClass"), definition = function(object){
     return(print(paste("***", obj...@text)))  })
fix(doStuff) # Does NOT give the intended result. How can I make R show the 
method definition?

Cheers!!
Albert-Jan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public 
order, irrigation, roads, a fresh water system, and public health, what have 
the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



        [[alternative HTML version deleted]]




______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to