Skip to content

Commit

Permalink
Eliminate use of DSR
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Jul 11, 2016
1 parent d76029a commit 1bddb9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 0 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Imports:
bookdown,
broom,
dplyr,
DSR,
gapminder,
ggplot2,
hexbin,
Expand All @@ -36,7 +35,6 @@ Imports:
tibble,
tidyr
Remotes:
garrettgman/DSR,
hadley/modelr,
hadley/readr,
hadley/stringr,
Expand Down
7 changes: 3 additions & 4 deletions tidy.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 1bddb9c

Please sign in to comment.