Add missing assignment

This commit is contained in:
Hadley Wickham 2021-02-08 12:11:28 -06:00
parent 8670e92a8c
commit 8170f7c4f9
1 changed files with 3 additions and 2 deletions

View File

@ -207,10 +207,11 @@ broom::glance(nz_mod)
We can use `mutate()` and `unnest()` to create a data frame with a row for each country:
```{r}
by_country %>%
glance <- by_country %>%
mutate(glance = map(model, broom::glance)) %>%
select(-data, -model, -resids) %>% # removing the unnecessary list columns
select(country, continent, glance) %>%
unnest(glance)
glance
```
(Pay attention to the variables that aren't printed: there's a lot of useful stuff there.)