This week we will finish reading Chapter 3 and discuss Chapter 4.
August 26, 2019
This week we will finish reading Chapter 3 and discuss Chapter 4.
From the authors.
"… particularly useful for categorical variables, is to split your plot into facets, subplots that each display one subset of the data."
How to add a smoothing line to a scatterplot?
ggplot(data = mpg) +
geom_point(mapping = aes(x = displ, y = hwy))
ggplot(data = mpg) +
geom_smooth(mapping = aes(x = displ, y = hwy))
library(tidyverse) ggplot(data = mpg) + geom_point(mapping = aes(x = displ, y = hwy))
ggplot(data = mpg) + geom_smooth(mapping = aes(x = displ, y = hwy))
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
ggplot(data = mpg) + geom_point(mapping = aes(x = displ, y = hwy)) + geom_smooth(mapping = aes(x = displ, y = hwy))
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
"identity", "dodge" or "fill"