Re: [R] R.oo data members / inheritance

2011-08-29 Thread Ben qant
Henrik, Your last suggestion did not work for me. It seems like it does not allow me to create a ClassB object with 3 arguments: setConstructorS3(ClassA, function(A=15, x=NA) { + extend(Object(), ClassA, +.size = A, +.x=x + ) + }) setConstructorS3(ClassB, function(..., bData=NA) { +

Re: [R] R.oo data members / inheritance

2011-08-29 Thread Ben qant
Correction. My solution didn't work either Didn't return the correct values. Can you post an example that takes three arguments? I'm working on how to do this now. thanks...sorry. Im new to R and R.oo. Ben On Mon, Aug 29, 2011 at 8:35 AM, Ben qant ccqu...@gmail.com wrote: Henrik, Your

Re: [R] R.oo data members / inheritance

2011-08-29 Thread Henrik Bengtsson
Hi, comments below. On Mon, Aug 29, 2011 at 8:12 AM, Ben qant ccqu...@gmail.com wrote: Correction. My solution didn't work either Didn't return the correct values. Can you post an example that takes three arguments? I'm working on how to do this now. thanks...sorry. Im new to R and R.oo.

[R] R.oo data members / inheritance

2011-08-26 Thread Ben qant
If someone is able, can you tell me if there is a better way to do this? More specifically, do I have to rewrite all of the data members stuff and extend stuff of parent class in the child class? See below. Thanks in advance! Example 1: setConstructorS3(ClassA, function(A,x) {

Re: [R] R.oo data members / inheritance

2011-08-26 Thread Henrik Bengtsson
Hi. On Fri, Aug 26, 2011 at 8:58 AM, Ben qant ccqu...@gmail.com wrote: If someone is able, can you tell me if there is a better way to do this? More specifically, do I have to rewrite all of the data members stuff  and extend stuff of parent class in the child class? No. See below. Thanks