Visualizing data in R – An intro to ggplot
These notes accompany portions of Chapter 2 — Displaying Data — of our textbook, which we revisit later. The reading below is required,
Whitlock and Schluter (2020) is not.
Motivating scenarios: Motivating scenarios: you have a fresh new data set and want to check it out. How do you go about looking into it?
Learning goals: By the end of this chapter you should be able to:
- Build a simple ggplot.
- Explain the idea of mapping data onto aesthetics, and the use of different geoms.
- Match common plots to common data type.
- Use geoms in ggplot to generate the common plots (above).
There is no external reading for this chapter, but watch the embedded vidoes, and complete all embedded learnR excercises. Then go to canvas to fill out the evaluation. You will need to make three very different types of plots from the mpg
data.
Whitlock, Michael C, and Dolph Schluter. 2020. The Analysis of Biological Data. Third Edition.