Getting a Web application to talk to R

April 29, 2010

[This article was first published on Revolutions, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Let’s face it: you can do some pretty awesome things with R — statistical models, beautiful charts, you name it — but if the only way to do those things is from the R command line you’re limiting the audience of people who might make use of all this awesomeness to a limited subset: R programmers.

What if you could get the results of R programs, charts and data, into a Web application? R’s an open system, so it’s definitely possible. To get started, Neil Saunders shows us how to build a simple Web application that displays data and a chart from an R script, by serving JSON or CSV from Rails to RApache and sending a result back to Rails. As he points out, it’s not a complete solution — "a real application would require more model or controller methods, views, R functions, error checks and prettier views, perhaps with a dash of AJAX thrown in", but it’s a great starting point.

What You’re Doing Is Rather Desperate: Getting your web application and R(Apache) to talk to each other

To leave a comment for the author, please follow the link and comment on their blog: Revolutions. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: ,

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)