Re: [Rd] Using substitute from inside an S4 method

2006-01-25 Thread bill
On Wed, 25 Jan 2006, Seth Falcon wrote: > I would like to access the name of a variable passed to an S4 method. > For a function, I would do this: > > f <- function(x) as.character(substitute(x)) > > This also works for a the examples I have tried for methods that do > not have extra, non-disp

Re: [Rd] Using substitute from inside an S4 method

2006-01-25 Thread Gabor Grothendieck
Try defining your method like this. I don't know how generally this works but it seems to work here. setMethod("A", signature(x="numeric"), function(x, y) as.character(substitute(x, sys.frame(-1 On 1/25/06, Seth Falcon <[EMAIL PROTECTED]> wrote: > Hi all, > > I would like to ac