[R] R & PHP (moving slightly offtopic, sorry)

James Marca jmarca at translab.its.uci.edu
Fri Jun 7 01:38:07 CEST 2002

On Thu, Jun 06, 2002 at 11:53:50AM -0700 or thereabouts, Joe Conway wrote:
> Christian Schulz wrote:
> > Hi,
> > have anybody experience or do something in  R with PHP togehter (...and 
> > MySQL as DB) ?
> > It would be nice  for a exchange of ideas !
> > 
> > Thanks for advance  & regards,
> > christian
> I've done a little with R, PHP, and PostgreSQL together. The details are 
> probably a bit off-topic for the list, but I'll be happy to discuss my 
> approach off-list if you'd like.
> Ultimately I'd love to see an R extension written for PHP. It would be 
> very slick if R could be called from PHP to cook raw data, and then 
> output a graph to a GD device directly. I might even attempt it myself 
> at some point, but at the moment I don't have the time to take on 
> something of that magnatude.
> Joe
I may be a complete lunatic, but I am having reasonably good luck with 
a combination of Perl and TemplateToolkit.  I write templates for 
TT that shuttle data from MySQL with  Perl into pre-cooked R code.  
I assume there are template libraries for PHP (a language I have 
never used), and that you can do something similar without too much effort. 

My application is processing streaming GPS data, which I process with various 
routines from spatstat and geoR.  The data changes, but the core code 
remains the same, so it is a good candidate for a template.
This is not an integration of R and Perl (or R and PHP, or any other web
server language), but it is quick to implement and stable.

Of course, my implementation would probably scare small children
and make the R and Perl gurus gnash their teeth, but so it goes.

James Marca

r-help 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-help-request at stat.math.ethz.ch

More information about the R-help mailing list