- We are building up to doing data visualization in R via the
ggplot2package - Last time we reverse-engineered the grammar from graphical outputs
- Today we (forward) engineer them
Fri Sep 23, 2016
ggplot2 packageA statistical graphic is a mapping of data variables to aes()thetic attributes of geom_etric objects.
The five named graphs we'll see in this class
Consider the following data in tidy format:
| A | B | C | D |
|---|---|---|---|
| 1 | 1 | 3 | a |
| 2 | 2 | 2 | a |
| 3 | 3 | 1 | b |
| 4 | 4 | 2 | b |
Draw the 5 graphics below, where the x-axis is variable A, the y-axis is variable B, and
color of the points corresponds to Dsize of the points corresponds to Ccolor of the line corresponds to D