Skip to content
Prev 26432 / 63424 Next

LazyLoad changes the class of objects

Yes (on the yes), to second Luke.  Here is John Chambers' comment when
I was bitten by the same "bug" a while ago:

  http://tolstoy.newcastle.edu.au/R/devel/02b/0524.html

See also Peter Dalgaard's follow up suggesting to wrap up the
environment in a list, which will typically be enough.  I've been
using this "trick" successfully in the Object class (R.oo package) for
several years, where I'm putting the environment in the attributes
list of an object, i.e.  obj <- NA; attr(NA, "..env") <- new.env();
It turned out at the time that this was slightly faster to access than
using a list element.

Cheers

Henrik
On 10/17/07, Luke Tierney <luke at stat.uiowa.edu> wrote: