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) m...@type^x,type=0)
Many thanks,
Vitalie.
______________________________________________
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.