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:
Kevin Ferris 2021-02-08 08:31:10 -08:00 committed by GitHub
parent e2d5d7b31a
commit 9d6ed46c5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 9 deletions

View File

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