Jeffrey Horner
2005-Jan-21 18:06 UTC
[Rd] Struggling with S3/S4 interface issues and External Pointers
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 been using integer vectors which is what RMySQL does but doesn't seem natural. For those interested in my Apache R implementation, please download here: http://biostat.mc.vanderbilt.edu/twiki/pub/Main/JeffreyHorner/mod_R-0.0.tar.gz Cheers, -- Jeffrey Horner Computer Systems Analyst School of Medicine 615-322-8606 Department of Biostatistics Vanderbilt University
Prof Brian Ripley
2005-Jan-21 19:18 UTC
[Rd] Struggling with S3/S4 interface issues and External Pointers
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'veYes, 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
Jeffrey Horner
2005-Jan-21 19:31 UTC
[Rd] Struggling with S3/S4 interface issues and External Pointers
Prof Brian Ripley wrote: [...]>> You asked elsewhere why RMySQL does not use it, but AFAIK it predates > the mechanism. RODBC and XML have only used it recently.Actually, Luke suggested it be used when DBI was just forming: https://stat.ethz.ch/pipermail/r-sig-db/2001-October/000028.html -- Jeffrey Horner Computer Systems Analyst School of Medicine 615-322-8606 Department of Biostatistics Vanderbilt University