# NOT RUN {
tapply(Homes$price, Homes$year, mean)
tapply(Homes$price, Homes$region, mean)
p2000 <- subset(Homes, year == "2000")
p1994 <- subset(Homes, year == "1994")
# }
# NOT RUN {
library(dplyr)
library(ggplot2)
dplyr::group_by(Homes, year, region) %>%
summarize(AvgPrice = mean(price))
ggplot2::ggplot(data = Homes, aes(x = region, y = price)) +
geom_boxplot() +
theme_bw() +
facet_grid(year ~ .)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab