[R] Object orientation?
Duncan Murdoch
murdoch at stats.uwo.ca
Wed Jan 24 16:14:51 CET 2001
I expect you could do something like
let(MyO, ThisProperty = ThisValue)
with a declaration for the function like this:
let <- function(obj, ...)
{
properties <- list(...)
assign( something, envir = something)
}
and playing around with the sys.frame function, substitute, etc., to
fill in the gaps. I think the details are in the R extensions manual.
Look at
get("mode<-")
for an example of a function call constructed from the arguments, and
an assignment made in a parent frame.
Duncan Murdoch
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list