Skip to content

Question about R.oo package

2 messages · Kaisers at med.uni-duesseldorf.de, Henrik Bengtsson

11 days later
#
Hi W. Kaisers,

sorry for the delay - I just spotted you question:
On Thu, Jun 16, 2011 at 5:52 AM, <Kaisers at med.uni-duesseldorf.de> wrote:
Yes, this is the expected behavior.  The reason is that the first time
the constructor is called, a static instance of the class is also
created (which is done by calling the constructor yet again without
arguments).  There is only one static instance of a class, so any
following calls to the constructor will not spawn a second call.

Related questions have been asked before and my answers then may
clarify this further, e.g.

[R] First call to constructor fails (R.oo), December 10, 2008
https://stat.ethz.ch/pipermail/r-help/2008-December/182212.html

[R] Help with R.oo, July 17, 2009
https://stat.ethz.ch/pipermail/r-help/2009-July/204951.html

Hope this helps

Henrik