Models-many.Rmd: Spelling/grammar (#858)
This commit is contained in:
parent
f6aeebab5f
commit
f34678da55
|
@ -166,14 +166,14 @@ by_country <- 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}
|
```{r}
|
||||||
resids <- unnest(by_country, resids)
|
resids <- unnest(by_country, resids)
|
||||||
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:
|
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
|
1. `broom::augment(model, data)` returns a row for each row in `data`, adding
|
||||||
extra values like residuals, and influence statistics.
|
extra values like residuals, and influence statistics.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue