RSS Web Interfaces to GNU (S) - R

The following Web interface allows a user to submit R scripts interactively; edit the scripts; and resubmit the changed script by selecting the hypertext link button: "Run Program".  This interface is used only for existing datasets that are part of the R system and for demonstrations and simulations done in R.  A different mechanism for uploading your own datasets is outlined below.  Example R Scripts for use and modification are provided at the bottom of this web page - some of which run and return output, others are just script examples that do not run.  These R scripts can be run locally on your desktop PC by installing the appropriate binary version of R on your PC.  A Windows version can be downloaded here.   You will also need to install some additional packages.  Other binary versions can be found here.

As an example of using the Rweb web interface, click the "Run Program" button.  This R script creates a vector of 10 random normal deviates; displays the results; calculates the mean of the vector; and creates a histogram of the random numbers.  To view any text output, scroll to the bottom of the browser window.  To view any graphical output, select the "Display Graphic" link.  Selecting the browser "back page" button will return the reader to this document. 

An example R Script (click the "Run Program" icon to submit; click your back-page in your web browser to return to this web page):


Depending on the user load, response times can vary.  If you are experiencing slow response times, choose an alternate server that is hosting  the R web interface

Alternate servers:

Upload to Rweb Server

Unlike the above URL's, the following URL will allow you to upload a tab-delimited text file to the RSS server for R analysis.  The first line needs to consist of tab-delimited variable names.  The Rweb javascript automatically saves the data set in a dataset called X (that is an 'upper-case X'). 

To reference variables in your data set you can use the following collection of R functions:

# Note: The "pound-signs" are comments; "var1" is a hypothetical variable name in
# the dataset named "X".  Make sure that you replace "var1" with your own variable
# name.  The dataset is automatically named "X" when it is uploaded to Rweb server


names(X)              # the "names" function shows what the variable names are in "X"
attach(X)              #  the "attach" function allows one to reference the variables without
                            #  using the name of the dataset every time a variable is referred to.  


# After the attach function of "X", if "var1" is a variable in your data set, use the
# following to reference "var1" for analysis:


var1                      # type the name of the variable to display the values of "var1"          
summary(var1)      # calculates summary statistics of the values of variable "var1" 

# Note: if you don't use the attach function you can use the "pound-sign" to reference
# a variable that exists in a dataset as follows:


X$var1                  # display values of var1
summary(X$var1)  # summarize values of var1


R Script Examples
(note that some of these scripts are "live" scripts - these scripts run in place and return output to your web browser)

26) Confidence Intervals for Cohen's d (effect size), and Inferential Confidence Intervals 
      (pdf file of script and graph)
25) Christmas version of the Hypergeometric function (Acceptance Sampling)
      Example from textbook (pdf)
24) Interface to the true random number service provided by:    http://www.random.org
23) Monte Carlo Parameter Estimation - Simple Regression
22) Simulation and Estimation of Hidden Markov Model (HMM)
21) Monte Carlo Integration of the Bivariate Normal Distribution
20) Downloading data from a SSL enabled website using a HTTPS call
19) A Monte Carlo Simulation that Demonstrates Hyper-Parameter Models
      and Simpson's paradox with Linear Regression Models
18) Maximally Reliable Scores
17) Bootstrapped Screeplot I
16) Bootstrapped Screeplot II
15) Case Study (Marcy Haag)
14) Demonstration of "distplot" in Michael Friendly's book "Visualizing Categorical Data"
13) Simulation of Measurement Error in Predictor Model for Simple Linear Regression
12) Multiple Regression Simulation to demonstrate Bias in R squared and adjustment with bootstrap
11) Merging single response and multiple response survey data
10) Calculating the variability of a descriptive statistic over many samples
  9) Perform a multivariate two-sample permutation test using the cramer statistic
  8) Simulation of a 1-factor, 2 parameter IRT model - data created by logistic function; 
      thresholded then compared with a linear 1-factor common trait model based on 
      both tetrachoric and pearson correlation matrices.
  7) Simulation of Lord's Normal Ogive Item Response Model - estimation based on tetrachoric
      correlations.  Additionally, comparison is made to a 1 and 2 parameter IRT based on the logistic.
  6) Simulation of the Linear Common Factor Model (2 factors) with a CFA
  5) Generating Correlated Multivariate Normal Data
  4) Monte Carlo & Bootstrap Simulation of Proportion
  3) Item Response Theory (IRT) simulation and analysis - R Scripts for simulating IRT
  2) Simulating IRT model - Simulates a 3PL IRT model and gives some basic descriptives
  1) Fitting a Rasch model in R - Uses the function "clogit" (conditional logistic regression)
      from the library "survival"

Last updated:06/18/08 by Rich Herrington.