diff --git a/variation.Rmd b/variation.Rmd index 752f976..6f3ce40 100644 --- a/variation.Rmd +++ b/variation.Rmd @@ -663,7 +663,7 @@ A model is a type of summary that describes the relationships in your data. You ```{r echo = FALSE} diamonds2 <- filter(diamonds, x > 3, y > 3, y < 12) diamond_mod <- lm(y ~ x, data = diamonds2) -resids <- augment(diamond_mod) +resids <- broom::augment(diamond_mod) diamonds3 <- bind_rows(filter(resids, abs(.resid) > 0.5), sample_n(filter(resids, abs(.resid) <= 0.5), 1000)) %>% select(x, y)