From ripley at stats.ox.ac.uk  Fri Jan 21 19:17:54 2005
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Fri Jan 21 19:18:04 2005
Subject: [Rd] Struggling with S3/S4 interface issues and External Pointers
In-Reply-To: <41F13682.6060703@vanderbilt.edu>
References: <41F13682.6060703@vanderbilt.edu>
Message-ID: <Pine.LNX.4.61.0501211812430.28157@gannet.stats>

On Fri, 21 Jan 2005, Jeffrey Horner wrote:

> I'm currently working on embedding R into the Apache2 webserver (with some 
> positive results...), but I'm struggling to identify the best way to expose 
> the apache data and functions to R.
>
> A couple of thoughts:
>
> In light of the recent discussion on "S3/S4 classes performance comparson", 
> I'm leaning toward implementing the interface with S3 style classes. I 
> appreciate anyones advice on this.

> I JUST found (after roughly 6 months of studying R) Luke Tierney's note on 
> "Finalization and Weak References in R". From the developers page, this note 
> is listed as a "preliminary mechanism", but I scoured CRAN and noticed 
> packages like RODBC and XML are using it. Has this mechanism changed from 
> "preliminary" to "production" yet? For storing pointers in R variables, I've

Yes, but the documentation has not.  R itself uses the mechanism for 
DLLinfo.

The developer.r-project.org site is a mixture of old and new, but 
certainly worth perusing in the first month of studying R.

> been using integer vectors which is what RMySQL does but doesn't seem 
> natural.

You asked elsewhere why RMySQL does not use it, but AFAIK it predates the 
mechanism.  RODBC and XML have only used it recently.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] Struggling with S3/S4 interface issues and External Pointers
Prof Brian Ripley