search for: domultiplyweight

Displaying 1 result from an estimated 1 matches for "domultiplyweight".

2011 Aug 26
0
R.oo inheritance with pass by reference
...{ this$.AM }) setMethodS3("getWM", "AgeMultiplier", function(this, ...) { this$.WM }) setMethodS3("doMultiplyAge", "AgeMultiplier", function(this, ...) { a = this$.perobj; this$.AM = a$getAge() * this$.m; a$setAge(this$.AM); }) setMethodS3("doMultiplyWeight", "AgeMultiplier", function(this, ...) { a = this$.perobj; this$.WM = a$getWeight() * this$.m; a$setWeight(this$.WM); # a$wt = this$.WM; <- that does not work on an object that inheritance involved }) p1 <- PerMore(67,150) am1 = AgeMultiplier(5,p1) am1$doMultiplyAge...