views:

224

answers:

3

Hi guys,

I've spent a few weeks learning some R and I'm floored at just how slick and powerful it is. I'm using it to plot some data returned from an SQL query, and I'd like to be able to share those plots with others I work with through a web portal.

I realize I can create a cron job to run the R scripts on the webserver to create the plots daily to be viewed from the website as images. But is there any way I can set things up such that the images are created only when the user views the page? That way I could make a web interface that lets the user select date ranges, etc for the SQL query. (and then have R analyse the data and plot it)

Any advice?

Thanks!

+1  A: 

Beyond the other suggestions, you can use JRI and call R from Java.

Another nice option is to use the mediawiki plugin (read about it on the R-Wiki). It's very straightforward and gives you a simple markup for R.

Shane
+2  A: 

I don't do a lot of dynamic html stuff with R but you could start with either one of these

Also of interest may be brew for mixing R text and R code in web templates.

Dirk Eddelbuettel
+1, The R FAQ on Web interfaces, should be your first read, if you want a straight R solution.
Mark
+3  A: 

I like to call R to do statistical analysis from Python driven websites with rpy2.

Mark
.. or from PypeR [http://sourceforge.net/projects/rinpy/files/and http://www.jstatsoft.org/v35/c02/paper]
radek
@radek, thanks I didn't know about that module.
Mark