search for: getag

Displaying 3 results from an estimated 3 matches for "getag".

Did you mean: metag
2011 Aug 26
0
R.oo inheritance with pass by reference
...n obj$dataMember. I am new to R.oo so if you know how to do this better or have some tricks please email me at ccquant@g*m@il.com. setConstructorS3("Person", function(age) { if (missing(age)) age <- NA; extend(Object(), "Person", .age=age ) }) setMethodS3("getAge", "Person", function(this, ...) { this$.age; }) setMethodS3("setAge", "Person", function(this,num, ...) { this$.age = num; }) #.......................................................... setConstructorS3("PerMore", function(age,wt) { if (missing(ag...
2011 Aug 23
1
R.oo modify an object inside another classes method
Can someone show me how to modify one (R.oo) class's object inside another (R.oo) class's method? Is that possible with the R.oo package? A quick example or reference to an example would be outstanding... Thanks, Ben [[alternative HTML version deleted]]
2011 Oct 27
0
R.oo package, inherit two classes
...rDog from classes Dog and Person. Error at bottom. I've tried a few other ways of using extend(), but nothing seems to get me what I want. Example: setConstructorS3("Person", function(age=NA) { this = extend(Object(), "Person", .age=age ) this }) setMethodS3("getAge", "Person", function(this, ...) { this$.age; }) setMethodS3("setAge", "Person", function(this,num, ...) { this$.age = num; }) # .......................................... setConstructorS3("Dog", function(dog_age=NA) { this = extend(Object(), "...