logo


Programs in R

David C. Howell

GreenBlueBar.gif GreenBlueBar.gif

Statistical Methods for Psychology, 8th ed. contains many references to programs written in R. This page contains links to those programs and others that I have not pointed to. It also contains links to web pages that provide varying levels of explanation of the R environment. Many of these programs do more than just a basic analysis, and you are encouraged to play with them and add or subtract analyses.

These programs can be used a several different levels. You first need download R to your computer, but if you can install ITunes, you can install R. Just go to Using R for a simple explanation. The installation of R can be as complex as you want to make it, but it can also be as simple as you want to make it. Once you have R installed, you can start it up and cut and paste the syntax I give straight into the editor (click on "New Script") and run it. If that is all you want to do, fine. If you want to look at the code and change it to give different examples, that's better yet. If you want to learn a bit about R and write your own code, or modify mine, that's even better. One of the best ways to learn R is to steal other people's code and play with it. If you want a step-by-step approach to downloading R, I have written one and you can find it at Downloading R

As I said, you can just paste commands into the R syntax editor that you open under the File command and then run them with Ctrl-R. If you are going to take R seriously, I suggest a good editor that will interact directly with R. I have a great editor named Tinn-R --it is free- that works beautifully with R. An excellent site describing how to install it, as well as other editors, can be found at http://wwwmaths.anu.edu.au/~johnm/r-book/2edn/xtras/setup.pdf. If you don't want to go that far at first, pasting things into any editor (even Notepad) will allow you to do any editing before you paste the code into R. The "new script" approach is easiest.

R Programs from Text

Before you jump into the following programs, I suggest that you look at the Using R page.It is a quick introduction to R and shows you how to load data and run various functions.


GreenBlueBar.gif
GreenBlueBar.gif dch:

Free JavaScripts provided
by The JavaScript Source