Scope augment call

This commit is contained in:
hadley 2016-07-15 15:50:23 -05:00
parent 6d5cb638f2
commit 42bb4f8fe0
1 changed files with 1 additions and 1 deletions

View File

@ -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)