From telford@progsoc.uts.edu.au  Fri Sep 15 06:58:09 2000
From: telford@progsoc.uts.edu.au (Telford Tendys)
Date: Fri, 15 Sep 2000 16:58:09 +1100
Subject: [Rd] classed
In-Reply-To: <3.0.32.20000915142129.0129d2d0@pophost.nsw.cmis.csiro.au>; from Bill.Venables@cmis.csiro.au on Fri, Sep 15, 2000 at 02:21:29PM +1000
References: <3.0.32.20000915142129.0129d2d0@pophost.nsw.cmis.csiro.au>
Message-ID: <20000915165809.I24267@ftoomsh.progsoc.uts.edu.au>

On Fri, Sep 15, 2000 at 02:21:29PM +1000, Bill Venables wrote:
> And nor does it.  What happens is that a new object is constructed from x,
> with (in this case) extra bits and pieces tacked on and (here) that new
> object is assigned the name y.
> 
> Writing a function to modify its argument is possible (e.g. fix() does it)
> but not altogether straightforward, especially if you want it to work in
> the most general case.

Hmmm, OK now that I test it out you are quite correct. But that implies
that the whole object is copied because later modification of either the
original or the result do not propagate between x and y... unless R has
some sort of copy-on-write flag which I never noticed when wandering 
through the R source (a lot probably falls into that category).

If it doesn't use copy-on-write then the result will be additional
slowdown when all your data is copied again and again (I guess it depends
on how big the object is).

	- Tel
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] classed
Telford Tendys