These pages provide a few short guides to getting going with R, a free statistical package.
- Obtaining a graphical user interface (GUI).
- At this point, I suggest you read the short guide by Owen (2007), The R Guide, in its entirety. This covers basic data entry, maths, and some statistics.
- Basics of R objects; entering and manipulating data.
- Input and output: scripts, saving and loading data (including database access).
- Basic statistics.
- Analysis of variance (ANOVA).
- Basic graphs (1).
- Basic graphs (2, with ggplot2).
- Graphs 3: more examples.
- Handy extensions to R.
Note some general points:
- Use q() to quit.
- Use help.search("keyword") or apropos("keyword") to find stuff in R.
- Use ?keyword for help on a particular topic.
- Use install.packages() to install new R packages (via a graphical interface), or install.packages("package").
- Use functionname (a function name without the usual brackets) to view the source code for a function. If this just shows a UseMethod call (e.g. try this for wilcox.test), then use methods(...) (e.g. methods(wilcox.test) ). That may show you a list of functions, including some non-visible ones. To see their source, use getAnywhere(...) (e.g. wilcox.test.default is listed, so use getAnywhere('wilcox.test.default') ).
- Press CTRL-L to clear the screen.
Typographical conventions used here:
# This is code (stuff you type into R). Hashes (#) indicate comments.
This is output (stuff that R shows you).
/* This is SPSS syntax (stuff you type into SPSS), for comparison to R. */
Other excellent introductions to R on the web include:
For other specific things:
Reference sources (less readable!), include: