This is the course webpage for a course called "R, LaTeX, Sweave and R packages" that I taught to students from the department of economics at the University of Waterloo.
All my slides are uploaded as a movie in the Quicktime movie format (compressed), in full quality PDF format and as an Keynote html export. Probably the best way to learn the content is by using the html slides with Safari or Chrome. When using the Quicktime movies: you need to press the arrow keys to advance to the next slide or go back to the previous slide (manual advance). Some of the PDF content might be a awkward, as the presentation sometimes uses animation to explain the content.
This web page is work in progress. I will be updating the content here frequently. So keep coming back.
Lecture 1: Introduction to R
- What is R
- R documentation
- An Introduction to R by W. N. Venables, D. M. Smith and the R Core Team
- simpleR - Using R for Introductory Statistics by John Verzani
- use R! Springer series especially
- Applied Econometrics with R by Kleiber and Zeileis
- Introductory Time Series with R by Cowpertwait and Metcalfe
- Essential Software for Statistics by myself
- Integrated Development Environments (IDEs)
- R help
Lecture 2: R basics
- Data types
- Numerical
- Logical
- Character
- Data structures
- Vector
- Matrix
- Array
- Data Frame
- List
- Variables and the Workspace
- Functions
Lecture 3: Data Analysis in R
Will be taught on November 8 2012 from 12:30pm - 1:50pm in EV1 350.
- R packages
- Simple Linear Regression
- Importing Data
- Data Manipulation with R by Phil Spector
- Regular Expression
- Mastering Regular Expressions by Jeffrey Friedl
- Working Directory
- Reshaping Data
- reshape R package by Hadley Wickham
- Tables
- tables R package by Duncan Murdoch
- Time Series Data
- Introductory Time Series with R by Paul S.P. Cowpertwait and Andrew V. Metcalfe
- Additional useful content not mentioned in slides
- dplyr for working with data
Lecture 4: Graphics
- base R Graphics
- plot, points, lines, segments, polygon, text
- graphical parameters: col, pch, cex, pointsize
- time series, histogram
- saving graphics: pdf, png, jpg, eps, svg
- Also see
- R Graphics by Paul Murrell
- A Beginner's Guide to R by Zuur, Alain, Ieno, Elena N., Meesters, Erik
- R Graph Gallery
- Color Themes
- Statistical Distributions in R
- Maps
- Applied Spatial Data Analysis with R by Bivand, Roger S., Pebesma, Edzer J., Gómez-Rubio, Virgilio
- ggplot2
- ggplot2 by Hadley Wickham
- The Grammar of Graphics by Leland Wolkinson
- Lattice
- Lattice, Multivariate Data Visualization with R by Deepayan Sarkar (book webpage)
- Mondrian
- Interactive Graphics for Data Analysis by Martin Theus and Simon Urbanek
- GGobi
- Interactive and Dynamic Graphics for Data Analysis witj R and GGobi by Dianne Cook and Deborah F. Swayne
- RnavGraph
- InkScape open source vector drawing program
- Additional useful content not mentioned in slides
- loon for interactive statistical data visualization
Lecture 5: Programming Fundamentals
- Contidions: if, ifelse
- Loops: for, while, sapply, lapply, apply, tapply
- Functions
- Default Arguments
- Ellipsis
- Local and Global Variables
- Scoping
- Search Path
- Object Oriented Language Features
- S3
- A (Not So) Short Introduction to S4 by Christophe Genolini
- R5 by Hadley Wickham
- Additional useful content not mentioned in slides
- Advanced R by Hadley Wickham
Lecture 6: LaTeX
- LaTeX distribution
- LaTeX editors / IDE
- LaTeX learning resources
- The Not So Short Introduction to LATEX2e by Tobi Oetiker et al.
- The LATEX Mathematics Companion by Helin Gai
- Short Math Guide for LaTeX by Michael Downes
- TikZ and PGF and the TikZ documentation
- Beamer and A Beamer Tutorial in Beamer by Charles T. Batts
- Memoir class
Lecture 7: Sweave and R packages
- Additional useful content not mentioned in slides
- R packages by Hadley Wickham
- R Markdown Dynamic Documents for R