Vitaly S.
2010-Oct-20 10:17 UTC
[Rd] new.env does not recognize parents from subclasses of "environment"
Dear Developers, A lot has been changed in the R12.0 with respect to behavior of "environment" subclasses. Many thanks for that. One small irregularity, though; new.env does not allow the parent to be from S4 subclass.> setClass("myenv", contains="environment")[1] "myenv"> new.env(parent=new("myenv"))Error in new.env(parent = new("myenv")) : 'enclos' must be an environment I wonder if this is a "planed" behavior. The use of .xData slot obviously works:> new.env(parent=new("myenv")@.xData)<environment: 063bb9e8>>Thanks, Vitaly.
John Chambers
2010-Oct-20 17:21 UTC
[Rd] new.env does not recognize parents from subclasses of "environment"
Thanks for the report. Should now be fixed in r-devel and 2.12 patched (rev 53383). Please do report any cases where a subclass of environment doesn't work. There are some known cases in locking and active binding, that will be fixed in due course. The workaround for any such problem is usually as.environment(). On 10/20/10 3:17 AM, Vitaly S. wrote:> Dear Developers, > > A lot has been changed in the R12.0 with respect to behavior of "environment" > subclasses. Many thanks for that. > > One small irregularity, though; new.env does not allow the parent to be from S4 > subclass. > > >> setClass("myenv", contains="environment") > [1] "myenv" >> new.env(parent=new("myenv")) > Error in new.env(parent = new("myenv")) : 'enclos' must be an environment > > I wonder if this is a "planed" behavior. > > The use of .xData slot obviously works: >> new.env(parent=new("myenv")@.xData) > <environment: 063bb9e8> > Thanks, > Vitaly. > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >
Martin Maechler
2010-Oct-23 17:53 UTC
[Rd] new.env does not recognize parents from subclassesof "environment"
On Sat, Oct 23, 2010 at 18:23, Peter Dalgaard <pdalgd at gmail.com> wrote:> On 10/23/2010 05:27 PM, Uwe Ligges wrote: >> >> >> On 23.10.2010 17:25, Martin Maechler wrote: >>> 2010/10/23 Uwe Ligges<ligges at statistik.tu-dortmund.de>: >>>> >>>> >>>> On 23.10.2010 17:08, Uwe Ligges wrote: >>>>> >>>>> Looks like those ETH pages were nnot updated after the R-2.12.0 release >>>>> (they do not show current R-tached / R-devel), hence CCing Martin >>>>> Maechler. >>>> >>>> >>>> ... which I actually do now... >>> >>> Hmm, but why? >>> The daily snapshot page *does* show the current R-patched and R-devel >>> tar balls ? >>> >>> Or what were you talking about ? >> >> We are talking about the >> >> http://stat.ethz.ch/R-manual/ >>Thank you Uwe. The other e-mail cited John mentioning the ./Software/ page. Indeed those are outdated. and for about 6 weeks. The reason has been ssh host keys changed, disabling a cron job to run the updates... I hope this will be ok, within a couple of hours.>> page. R-devel NEWS show R-2.12.0, just as on example. >> >> Uwe > > You need to get NEWS from $BUILDDIR these days. Anything left in $SRCDIR > is probably a relic.Yes, of course, but that has not been the problem here. Thank you Peter (and Uwe) Martin> > -- > Peter Dalgaard > Center for Statistics, Copenhagen Business School > Phone: (+45)38153501 > Email: pd.mes at cbs.dk ?Priv: PDalgd at gmail.com > >