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"

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to