From hadley at rice.edu  Wed May 11 14:00:42 2011
From: hadley at rice.edu (Hadley Wickham)
Date: Wed, 11 May 2011 07:00:42 -0500
Subject: [Rd] Reference Classes copy(shallow=FALSE) unexpected behavior.
In-Reply-To: <C9EF9A73.4978%manuel.castejon@unileon.es>
References: <C9EF9A73.4978%manuel.castejon@unileon.es>
Message-ID: <BANLkTi=GoqXmLm5y8VKu11=H7jebCG=9DA@mail.gmail.com>

2011/5/10 Manuel Castej?n Limas <manuel.castejon at unileon.es>:
> Dear all,
>
> I've just discovered the 'Reference Classes'.
> In a previous attempt ---a year ago--- to re-implement in a Object Oriented
> fashion the AMORE package using S4 classes I strongly felt the need of such
> capability. It's great to have the Reference Classes now available. Along
> with the discovery of the Rcpp package, this new programming paradigm has
> boosted my interest in rewriting that package.
>
> Nevertheless, I have found a surprising behavior in the $copy(shallow=FALSE)
> method. Let's have a look at the results which I believe are
> self-explanatories. The ".Data" field is a list which contains objects from
> the "Con" class ?---connections for what is worth---.

What sort of class is the Con class? S4 or reference?

Hadley


-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/



[Rd] Reference Classes copy(shallow=FALSE) unexpected behavior.
Hadley Wickham