Dear Wolfgang,
Thanks for the showMethod and the link.
Perhaps juggling with the 'n' argument of 'parent.frame' could help in
hacking something together that 'works'
I just change the argument list of foo2 to perfectly match with the
definition.
but as far as I can see what you want to is an
Where did you get the idea that 'x' comes from the parent frame?
There is no guarantee of this, and you are relying on/stumbling over
implementation details here. (An extra call is inserted by
setMethod() to handle the matching up of argumnets, but that is
something which may change, and has
Dear Christophe
type
showMethods("foo1", inc=TRUE)
showMethods("foo2", inc=TRUE)
to see the difference between the two functions, and this will explain
their different behaviour. This feature of S4 has been discussed here
many times before, see e.g.:
http://tolstoy.newcastle.edu.au/R/e4/help
Hi the list,
I define a method that want to change an object without assignation
(foo(x) and not x<-foo(x)) using deparse and assign.
But when the argument of the method does not match *exactly* with the
definition of the generic function, assign does not work...
Anything wrong?
Christophe
#-