- Does ozone level appear to impact the measured temperature?
- If present, does the does this pattern vary by month?
6/16/2020
library(ggplot2); library(gridExtra)
data <- airquality[complete.cases(airquality),]
data$Month <- as.factor(data$Month)
p1 <- ggplot(data=data, aes(x=Ozone, y=Temp)) +
geom_point(aes(color=Month)) + xlab("Ozone (ppb)") +
ylab("Temperature (F)") + ylim(55, 100) +
xlim(0, 170) + geom_smooth(method='lm')
p2 <- ggplot(data=data, aes(x=Ozone, y=Temp, color=Month)) +
geom_point() + xlab("Ozone (ppb)") + ylab("Temperature (F)") +
ylim(55, 100) + xlim(0, 170) + geom_smooth(method='lm')
grid.arrange(p1, p2, ncol=2)