From ggrothendieck at gmail.com  Thu Jul  2 15:39:16 2009
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Thu, 2 Jul 2009 09:39:16 -0400
Subject: [Rd] V2.9.0 changes [Sec=Unclassified]
In-Reply-To: <42C7503E0B99F248B06BC65E7D2B4E020122C50FB2FD@EX2K7-CCR.AAD.GOV.AU>
References: <4A40D7C2.7050307@fhcrc.org>
	<42C7503E0B99F248B06BC65E7D2B4E020122C50FB2FD@EX2K7-CCR.AAD.GOV.AU>
Message-ID: <971536df0907020639k2733406enaa1876af4988c170@mail.gmail.com>

On Thu, Jul 2, 2009 at 1:37 AM, Troy Robertson<Troy.Robertson at aad.gov.au> wrote:
> Well...
>
> My performance problems were in the pass-by-value semantics of R.
>
> I have just changed my classes to inherit from .environment and then moved data members from S4 slots to the .xData objects as Martin suggested.
>

Note that the R.oo and proto packages already use environments for
their storage. e.g.

library(proto)
p <- proto(a = 1, incr = function(.) .$a <- .$a + 1)
class(p) # c("proto", "environment")

p$a # 1
p$incr()
p$a # 2

p$ls() #  c("a", "incr")
ls(p) # same



[Rd] V2.9.0 changes [Sec=Unclassified]
Gabor Grothendieck