Displaying 1 result from an estimated 1 matches for "dog_ag".
Did you mean:
dogtag
2011 Oct 27
0
R.oo package, inherit two classes
...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(), "Dog",
.dog_age=dog_age
)
this
})
setMethodS3("getDogAge", "Dog", function(this, ...) {
this$.dog_age;
})
setMethodS3("setDogAge", "Dog", function(this,num, ...) {
this$.dog_age = num;
})
#...................