diff --git a/model-many.Rmd b/model-many.Rmd index f3a56f7..db0a463 100644 --- a/model-many.Rmd +++ b/model-many.Rmd @@ -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.)