Removed reference to deprecated .drop argument (#896)
According to the output and documentation, `.drop` was deprecated as an argument. I'd propose just removing this chunk and adding a comment in the original `unnest(glance)` pipeline
This commit is contained in:
parent
e2d5d7b31a
commit
9d6ed46c5e
|
@ -209,18 +209,10 @@ We can use `mutate()` and `unnest()` to create a data frame with a row for each
|
|||
```{r}
|
||||
by_country %>%
|
||||
mutate(glance = map(model, broom::glance)) %>%
|
||||
select(-data, -model, -resids) %>% # removing the unnecessary list columns
|
||||
unnest(glance)
|
||||
```
|
||||
|
||||
This isn't quite the output we want, because it still includes all the list columns. This is default behaviour when `unnest()` works on single row data frames. To suppress these columns we use `.drop = TRUE`:
|
||||
|
||||
```{r}
|
||||
glance <- by_country %>%
|
||||
mutate(glance = map(model, broom::glance)) %>%
|
||||
unnest(glance, .drop = TRUE)
|
||||
glance
|
||||
```
|
||||
|
||||
(Pay attention to the variables that aren't printed: there's a lot of useful stuff there.)
|
||||
|
||||
With this data frame in hand, we can start to look for models that don't fit well:
|
||||
|
|
Loading…
Reference in New Issue