Models-many.Rmd: Spelling/grammar (#858)

This commit is contained in:
Christian Heinrich 2020-10-03 16:37:42 +02:00 committed by GitHub
parent f6aeebab5f
commit f34678da55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -166,14 +166,14 @@ by_country <- by_country %>%
by_country
```
But how you can plot a list of data frames? Instead of struggling to answer that question, let's turn the list of data frames back into a regular data frame. Previously we used `nest()` to turn a regular data frame into an nested data frame, and now we do the opposite with `unnest()`:
But how can you plot a list of data frames? Instead of struggling to answer that question, let's turn the list of data frames back into a regular data frame. Previously we used `nest()` to turn a regular data frame into an nested data frame, and now we do the opposite with `unnest()`:
```{r}
resids <- unnest(by_country, resids)
resids
```
Note that each regular column is repeated one for each row in the nested column.
Note that each regular column is repeated once for each row of the nested tibble.
Now we have regular data frame, we can plot the residuals:
@ -575,4 +575,3 @@ The broom package provides three general tools for turning models into tidy data
1. `broom::augment(model, data)` returns a row for each row in `data`, adding
extra values like residuals, and influence statistics.