[R] Make functions aware of theyr own slots.
Vitalie S.
vitosmail at rambler.ru
Thu Jun 25 16:32:21 CEST 2009
Hello,
Is there a way to access function's slots from inside the function? I
want to make functions slot dependent without recurring to generic
function mechanism.
Probably this goes a bit against R philosophy, but otherwise I don't
really see the use of extending functions in R.
Would be nice to have something like:
setClass("myFunc",list(type="numeric"),contains="function")
foo<-new("myFunc",
function(x) me at type^x,type=0)
Many thanks,
Vitalie.
More information about the R-help
mailing list