Getting a Web application to talk to R

2 Min Read

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…

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

Link to original post

TAGGED:
Share This Article
Exit mobile version