Sean's R Pages

Sean's R Pages

2009 MARIACHI Workshop

Introducing R Keynote presentation (PDF)
test.txt
Example data-exploring session, Tue 7 Jul 2009
Experimental peak-finding session, Wed 8 Jul 2009

Example R code for using a legend in a plot
Example R code for placing labels directly in a plot

Commentary and Notes

Common errors
Miscellaneous tricks
Fitting and Regression
Working with factors
Getting nice log scales on plots

R has a vast collection of functions. This is an attempt to organize them into functional categories:

Random number distributions and sampling
Character String operations
File I/O
Formatting output

Coding Examples

File I/O: read some columns of data from a file, and ignore variable-length description information.
File I/O: reading in complex timestamp records and creating a data frame
Spherical Trig: Which way is Pittsburgh?

(Potentially) Useful Functions

hist.log10.R Semi-log10 histogram plot
plotxyerr.R X-Y plot with error bars
cartesian.R cartesian product of two vectors
least_squares_linear.R linear least squares fit, performed without using R's built-in regression routines
str2log10.R Convert Blast output e-val strings to numeric log10 values

Resources

R-project.org This is the main source
R Wiki R documentation contributed by the user community
Rseek.org
Quick-R
    Graphical Parameters
    Cluster Analysis
NY Times story, 6 Jan 2009
Dice.com piece about R being important for analytical careers