The development version of Rweb runs in 4 different browser windows and assumes your browser understands JavaScript. To start the development version of Rweb click on the "Open Code Window" buttom below. This will open the window where you type R (or Splus) code. After you have typed in the code you want to execute, just click on the submit button.
At the bottom of the code page is a text area where you can enter the URL for a dataset you would like to work on. The dataset will be read in using read.table with header=T and stored in a dataframe called X. The dataframe, X, will then be attached so you can use the variable names. Eventually I hope to add several other options for data entry ... let me know if you have any suggestions.
After your code has be executed three more browser windows will open to display the results.
Once all of the window are open you can keep typing code into the code window, edit what's there, or erase everything and start over. You can cut and paste between an editor window and the code window. You can also cut text or images out of the Rweb windows and paste them into documents (if the document editor supports pasting images).
On some browsers the Rweb JavaScript windows do not have menus or toolbar buttons. Many commands have keyboard shortcuts (which commands and the form of the shortcut depends on the browser and the operating system). Look in the menus of the browser that contains this document to see what shortcuts you have available. For example, in Netscape 3 on a Sun you use Alt P to print and on a Macintosh you use Command P. I don't know the shortcut for printing on PC's ... probably something along the lines of Alt Cntl ]/??@# Expletive Del $2MS-{now} (you know how DOS operates).
Eventually I hope to include options about the size of the windows and the browser features to be included in them. If you need a little help with R functions you can use the R function help page (this is just the help page included in the R distribution).
Here is some R code you can use to test things out.
# A little Regression x <- rnorm(100) # 100 random numbers from a normal(0,1) distribution y <- exp(x) + rnorm(100) # an exponential function with error result <- lsfit(x,y) # regress x on y and store the results ls.print(result) # print the regression results plot(x,y) # pretty obvious what this does abline(result) # add the regression line to the plot lines(lowess(x,y), col=2) # add a nonparametric regression line (a smoother) hist(result$residuals) # histogram of the residuals from the regression
## Boxplots n <- 10 g <- gl(n, 100, n * 100) x <- rnorm(n * 100) + sqrt(codes(g)) boxplot(split(x, g), col = "lavender", notch = TRUE)
# Scatter plot matrix data("iris") pairs(iris[1:4], main = "Edgar Anderson's Iris Data", font.main = 4, pch = 19) pairs(iris[1:4], main = "Edgar Anderson's Iris Data", pch = 21, bg = c("red", "green3", "blue")[codes(iris$Species)])
#Coplots data(quakes) coplot(long ~ lat | depth, data = quakes, pch = 21, bg = "green3")
#Image and contour plots (These are Owww-Ahhh plots) opar <- par(ask = interactive() && .Device == "X11") data(volcano) x <- 10 * (1:nrow(volcano)) x.at <- seq(100, 800, by = 100) y <- 10 * (1:ncol(volcano)) y.at <- seq(100, 600, by = 100) image(x, y, volcano, col = terrain.colors(100), axes = FALSE) rx <- range(x <- 10*1:nrow(volcano)) ry <- range(y <- 10*1:ncol(volcano)) ry <- ry + c(-1,1) * (diff(rx) - diff(ry))/2 tcol <- terrain.colors(12) par(opar); par(mfrow=c(1,1)); opar <- par(pty = "s", bg = "lightcyan") plot(x = 0, y = 0,type = "n", xlim = rx, ylim = ry, xlab = "", ylab = "") u <- par("usr") rect(u[1], u[3], u[2], u[4], col = tcol[8], border = "red") contour(x, y, volcano, col = tcol[2], lty = "solid", add = TRUE) title("A Topographic Map of Maunga Whau", font = 4) abline(h = 200*0:4, v = 200*0:4, col = "lightgray", lty = 2, lwd = 0.1) par(opar)