This repository has notes and exercises to help you teach yourself how to rapidly explore data with the ggplot2 R package.
It was written as a self-study component for the FISH554 class at the University of Washington.
-
Download this whole repository as a ZIP file and extract the ZIP file.
-
Find the notes document
ggplot2-notes.pdf
in the folder you just downloaded. You can also download it directly from this link. -
Install the knitr R package:
install.packages("knitr")
-
Open the file
ggplot2-exercises.Rmd
in RStudio. This is an R Markdown document. See the notes below if you're unfamiliar with R Markdown. The data fileMorph_for_Sato.csv
is in the same folder. -
Work your way through that file while you read the PDF notes document. When you want to check your work, or if you get really stuck, jump over to this version that has the answers.
You can read more about R Markdown on the RStudio website here and here.
The basic idea is to add R code within the code chunks:
```{r}
# Add your code here
```
You can then run those code chunks, jump to chunks via the pop up menu in the bottom left of the code window, and "knit" the whole document via the "Knit HTML" button at the top of your code window.
The notes document was also written with knitr, but the LaTeX version.
If you have any questions on the notes or exercises, or want to provide feedback, feel free to email me at sean "at" seananderson.ca.
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.