Eliminate use of DSR

This commit is contained in:
hadley 2016-07-11 08:35:07 -05:00
parent d76029a69e
commit 1bddb9c561
2 changed files with 3 additions and 6 deletions

View File

@ -11,7 +11,6 @@ Imports:
bookdown,
broom,
dplyr,
DSR,
gapminder,
ggplot2,
hexbin,
@ -36,7 +35,6 @@ Imports:
tibble,
tidyr
Remotes:
garrettgman/DSR,
hadley/modelr,
hadley/readr,
hadley/stringr,

View File

@ -24,12 +24,11 @@ In *Section 4.1*, you will learn how the features of R determine the best way to
```{r message=FALSE}
library(tidyr)
library(dplyr)
library(DSR)
```
## Tidy data
You can organize tabular data in many ways. For example, the data sets below show the same data organized in four different ways. Each data set shows the same values of four variables *country*, *year*, *population*, and *cases*, but each data set organizes the values into a different layout . You can access the data sets in the `DSR` package.
You can organize tabular data in many ways. For example, the data sets below show the same data organized in four different ways. Each data set shows the same values of four variables *country*, *year*, *population*, and *cases*, but each data set organizes the values into a different layout . You can access the data sets in tidyr.
```{r}
# Data set one
@ -374,7 +373,7 @@ You can further customize `separate()` with the `remove`, `convert`, and `extra`
**TODO: UNITE DESCRIPTION**
We can use `unite()` to rejoin the *century* and *year* columns that we created in the last example. That data is saved in the `DSR` package as `table6`.
We can use `unite()` to rejoin the *century* and *year* columns that we created in the last example. That data is saved as `tidyr::table6`.
```{r}
table6
@ -392,7 +391,7 @@ You can also use integers or the syntax of the `dplyr::select()` function to spe
## Case Study
The `who` data set in the `DSR` package contains cases of tuberculosis (TB) reported between 1995 and 2013 sorted by country, age, and gender. The data comes in the *2014 World Health Organization Global Tuberculosis Report*, available for download at [www.who.int/tb/country/data/download/en/](http://www.who.int/tb/country/data/download/en/). The data provides a wealth of epidemiological information, but it would be difficult to work with the data as it is.
The `who` data set in tidyr contains cases of tuberculosis (TB) reported between 1995 and 2013 sorted by country, age, and gender. The data comes in the *2014 World Health Organization Global Tuberculosis Report*, available for download at [www.who.int/tb/country/data/download/en/](http://www.who.int/tb/country/data/download/en/). The data provides a wealth of epidemiological information, but it would be difficult to work with the data as it is.
```{r}
who