[R] R.oo question

Omar Lakkis uofiowa at gmail.com
Fri May 26 23:36:58 CEST 2006


This is a simple R.oo question but I, thankfully, hope that someone
would explain it to me so I would better understand this work frame.
I create this class:

setConstructorS3("MyExample", function(param=0) {
  print(paste("called with param=", param))
  extend(Object(), "MyExample",
    .param = param
  );
})

>From what is printed out, who made the second call to the class with
the default param?

> MyExample(1)
[1] "called with param= 1"
[1] "called with param= 0"                # <- this is line in question
[1] "MyExample: 0x02831708"



More information about the R-help mailing list