As I work more and more with R I find it useful to assemble a collection of common tasks. Using R Markdown makes this even easier, as I can include description and working code in a single source file.
| Cheatsheet | Topics covered |
|---|---|
| Working with data tables | Loading CSV files into a data table, exploring the dimensions and content of the input, quick graphs, and cleaning up column data. |
| Creating a quick barchart | Exporting data from a MySQL database, adding an extra column to make the summary easier, then calculating the frequencies and creating a horizontal bar chart. |
| Exploring web usage data | Exporting data from a MySQL database, then creating a graph of page hits (with the ggplot2 library qplot() function) for the year using a loess smoothing function. |
I'll be adding more cheatsheets over time. You can also find the R Markdown source files for these pages on my GitHub repository