Ooops, need to eval that chunk
This commit is contained in:
parent
726ffcf6e5
commit
4a90bbe063
|
@ -111,7 +111,7 @@ Note the difference between a standard grouped data frame and a nested data fram
|
||||||
|
|
||||||
Now that we have our nested data frame, we're in a good position to fit some models because we can think about transforming each data frame into a model. Transforming each element of a list is the job of `purrr:map()`:
|
Now that we have our nested data frame, we're in a good position to fit some models because we can think about transforming each data frame into a model. Transforming each element of a list is the job of `purrr:map()`:
|
||||||
|
|
||||||
```{r, eval = FALSE}
|
```{r}
|
||||||
country_model <- function(df) {
|
country_model <- function(df) {
|
||||||
lm(lifeExp ~ year, data = df)
|
lm(lifeExp ~ year, data = df)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue