28

I doubt this is the right place to ask the question, but I was wondering if there is a good place for an introduction to developing web apps in R. I know people are doing it and I know about where to find out about RApache and brew but any kind of walkthrough?

Just checking before I start on my own.

jogo
  • 12,469
  • 11
  • 37
  • 42
Dan
  • 6,008
  • 7
  • 40
  • 41
  • 4
    For future reference, don't forget to check out the newcomer to the field: http://www.rstudio.com/shiny/ – Karol J. Piczak Dec 05 '12 at 14:46
  • @KarolJ.Piczak: While Shiny is excellent, it suffers from the problem of not having authentication and authorization built in for free. You have to use it from one of their paid solutions. The support team says they don't yet have plans of providing a free authentication functionality. Somebody has created `shinymanager` to mitigate this, but it is yet to mature. – Nav Sep 07 '22 at 12:05

4 Answers4

13

An update, several years later:

What technology to use for integrating R into web apps depends upon the scale of what you are trying to accomplish.

For small, standalone web apps, Shiny is fast becoming the de facto standard. It is relatively easy to use, and there are paid support options.

For bigger projects, you are probably better off using whatever web framework you are comfortable with and then figuring out how to connect to R. (You can call R from the command line from any more-or-less any other software, and there are some slightly nicer interfaces to R such as rJava for Java apps.) This sounds a little vague, but for such projects the important decisions are based on "what does your company already use?" and "what do you need R for?"


Original answer:

There are lots of different ways of creating a web app with R. Most (if not all) are listed in the FAQ on R document.

If you want to use RApache, there's a presentation on the old RApache site that might be useful to get you started. Otherwise, RWui is very simple to use, but not so flexible (last time I used it, anyway), and rcom/StatConnector can be used to run R from your web server.

Richie Cotton
  • 118,240
  • 47
  • 247
  • 360
9

I just came a cross this old question.

There are three, newer, videos you can watch:

  1. R Web Application – “Hello World” using RApache (~7min video tutorial)
  2. Web Development with R – an HD video tutorial of Jeroen Ooms talk
  3. A web application for R’s ggplot2

(I could have linked just to the youtube videos, but the posts also includes extra links to code, presentations and explanations)

Tal Galili
  • 24,605
  • 44
  • 129
  • 187
3

Check out Jeroen Ooms' useR!2009 presentation - this also contains an example. I believe Stockplot R web application has been built using the same techniques.

learnr
  • 6,479
  • 4
  • 27
  • 23
  • 1
    @Zach [This](http://jeroenooms.github.io/) is the new site of Jeroen Ooms, which contains both presentations and web applications. – Dag Hjermann May 02 '13 at 10:09
3

Have you seen http://shiny.rstudio.com/. You can check the tutorials that, with mixed levels of complexity, browse over many off the shiny tool palette. Shiny allows you to easily develop webapps in R and add some HTML.

The problem I find with this, is that as your webapp grows, the shiny client/server abstractions become problematic for development and you need to retort to some gimmicks (observe, reactive, etc) in order to accommodate dynamic web usage.

So, my suggestion would be to balance the amount of webapp vs. R development. If you need more of the former, then Shiny will not suffice.

MB