Re: [Rd] The default behaviour of a missing entry in an environment

From: Trishank Karthik Kuppusamy <tk47_at_nyu.edu>
Date: Fri, 13 Nov 2009 15:50:54 -0500

Hello Henrik,

On Nov 13, 2009, at 3:42 PM, Henrik Bengtsson wrote:

> If you develop your own code you can add your own behavior by
> "extending" the environment class. I put "extending" in quotation
> marks, because 'environment' is one of few classes you should *not*
> extend from in the regular S3 (and S4?) sense, at least that was the
> case a few years ago. You can search the r-devel list about issues
> when trying to do so. One thing I remember is that it didn't work
> well to save such objects. Bla bla bla, there are workarounds for it
> and the Object class in the R.oo package is one. Here is how you can
> add your protection for your own environment-like objects:

I like this solution! (As well as the name of the picky object.) If the environment class can be properly subclassed, then everything should work in principle. Thanks for the tip.

-Trishank



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 13 Nov 2009 - 20:53:43 GMT

This archive was generated by hypermail 2.2.0 : Fri 13 Nov 2009 - 21:00:26 GMT