From 5872fd7811852366d1fbab3565b39e5dcb42a798 Mon Sep 17 00:00:00 2001 From: behrman Date: Mon, 3 Oct 2016 06:37:40 -0700 Subject: [PATCH] Fix typos (#433) --- model-many.Rmd | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/model-many.Rmd b/model-many.Rmd index b2955be..08f9f2b 100644 --- a/model-many.Rmd +++ b/model-many.Rmd @@ -246,7 +246,7 @@ glance %>% geom_jitter(width = 0.5) ``` -We could put out the countries with particularly bad $R^2$ and plot the data: +We could pull out the countries with particularly bad $R^2$ and plot the data: ```{r} bad_fit <- filter(glance, r.squared < 0.25) @@ -257,7 +257,7 @@ gapminder %>% geom_line() ``` -We see two main effects here: the tragedies of the HIV/AIDS epidemic, and the Rwandan genocide. +We see two main effects here: the tragedies of the HIV/AIDS epidemic and the Rwandan genocide. ### Exercises @@ -307,13 +307,13 @@ List-columns are often most useful as intermediate data structure. They're hard Generally there are three parts of an effective list-column pipeline: -1. You create the list-column using one of `nest()`, `summarise()` + `list()` +1. You create the list-column using one of `nest()`, `summarise()` + `list()`, or `mutate()` + a map function, as described in [Creating list-columns]. 1. You create other intermediate list-columns by transforming existing list columns with `map()`, `map2()` or `pmap()`. For example, in the case study above, we created a list-column of models by transforming - a list column of data frames. + a list-column of data frames. 1. You simplify the list-column back down to a data frame or atomic vector, as described in [Simplifying list-columns]. @@ -331,7 +331,7 @@ Typically, you won't create list-columns with `tibble()`. Instead, you'll create Alternatively, you might create them from a named list, using `tibble::enframe()`. -Generally, when creating list-columns, you should make sure they're homogeneous: each element should contain the same type of thing. There are no checks to make sure this is true, but if you use purrr and remember what you've learned about type-stable functions you should find it happens naturally. +Generally, when creating list-columns, you should make sure they're homogeneous: each element should contain the same type of thing. There are no checks to make sure this is true, but if you use purrr and remember what you've learned about type-stable functions, you should find it happens naturally. ### With nesting @@ -474,7 +474,7 @@ df %>% To apply the techniques of data manipulation and visualisation you've learned in this book, you'll need to simplify the list-column back to a regular column (an atomic vector), or set of columns. The technique you'll use to collapse back down to a simpler structure depends on whether you want a single value per element, or multiple values: -1. If you want a single values, use `mutate()` with `map_lgl()`, +1. If you want a single value, use `mutate()` with `map_lgl()`, `map_int()`, `map_dbl()`, and `map_chr()` to create an atomic vector. 1. If you want many values, use `unnest()` to convert list-columns back