Ted.Harding-2 wrote: > > Greetings All, > > Out of curiosity, I've just done a very primitive experiment: > > Obj <- list(Fun=sum, Dat=c(1,2,3,4)) > Obj$Fun(Obj$Dat) > # [1] 10 > > That sort of thing (much more sophisticated) must be documented > mind-blowingly somewhere. Where? > > Where I stand right now: The above (and its immediately obvious > generalisations, like Obj$Fun<-cos) is all I know about it so far. > > Ted. >
You may want to take a look at the Proto package- it allows you to create objects that provide a reference to "self" inside their member functions. Hope this helps! -Charlie ----- Charlie Sharpsteen Undergraduate-- Environmental Resources Engineering Humboldt State University -- View this message in context: http://r.789695.n4.nabble.com/A-primitive-OO-in-R-where-next-tp2196862p2196948.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.