Quick tour in Rwui. November 23, The problem 1. 2 The R script 2

Quick tour in Rwui November 23, 2010 Contents 1 The problem 1 2 The R script 2 3 Creating the web application with Rwui 3.1 Step one: Choose a p...
Author: Quentin Barnett
0 downloads 2 Views 1MB Size
Quick tour in Rwui

November 23, 2010

Contents 1 The problem

1

2 The R script

2

3 Creating the web application with Rwui 3.1 Step one: Choose a project name and project description 3.2 Step two: Add a file upload button . . . . . . . . . . . . . 3.3 Step three: Define a variable . . . . . . . . . . . . . . . . 3.4 Step four: Define output files . . . . . . . . . . . . . . . . 3.5 Step five: Uploading the R script . . . . . . . . . . . . . . 3.6 Step six: Creating and downloading the web application . 3.7 Step seven: Deploy the application . . . . . . . . . . . . .

2 2 3 4 6 7 7 8

. . . . . . .

. . . . . . .

4 Using the application for analysing data 5 Modifying a previous application

1

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

9 11

The problem

Suppose you have an R script that reads in a simple table, for example X1 X2 X3 1.745 1.18 4.428 0.512 0.46 4.666 0.864 0.167 4.202 ... and produces a boxplot and provides some summary statistics, such as the mean and standard deviation for each column of the table. You want to make this analysis tool available on the web to other users by providing a simple web interface for uploading data, analysing them with the R script, and displaying the results. The next few sections will show you how simple this is using the web application Rwui. No programming skills, not even for HTML, are required (beyond R programming obviously). The only potential hurdle is the need to install a webserver like Tomcat, which isn’t too difficult either.

1

2

The R script

Here is a short R program that produces boxplots and summaries of a table stored in an input file whose name is stored in an R variable called fileName. dt