Displaying 1 result from an estimated 1 matches for "addstuff".
Did you mean:
add_stuff
2007 Dec 17
0
Extending data.frame
...e more and more functions, I decided to switch
to an OO approach so I can organize things better.
Looking around at the various approaches to OO R, I came across R.oo, which
seems nice.
Where I'm currently stuck is getting my objects to be mutable. For example,
in the following toy code, the addStuff() method has no effect:
> library(R.oo)
R.oo v1.3.0 (2006-08-29) successfully loaded. See ?R.oo for help.
> setConstructorS3("Foo", function(...) {
+ frame <- data.frame(foo=4, bar=3:5)
+ extend(frame, "Foo")
+ })
> setMethodS3("addStuff", "Foo&qu...