Adds separate and unite diagrams to tidy.Rmd

This commit is contained in:
Garrett 2016-07-18 12:07:55 -04:00
parent 061e233740
commit e4465bd767
4 changed files with 2 additions and 2 deletions

Binary file not shown.

BIN
images/tidy-17.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

BIN
images/tidy-18.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

View File

@ -333,7 +333,7 @@ You may have noticed that we skipped `table3` in the last section. `table3` is u
`separate()` turns a single character column into multiple columns by splitting the values of the column wherever a separator character appears.
[SEPARATE DIAGRAM] ![](images/blank.png)
![](images/tidy-17.png)
So, for example, we can use `separate()` to tidy `table3`, which combines values of *cases* and *population* in the same column.
@ -371,7 +371,7 @@ You can further customize `separate()` with the `remove`, `convert`, and `extra`
`unite()` does the opposite of `separate()`: it combines multiple columns into a single column.
**TODO: UNITE DESCRIPTION**
![](images/tidy-18.png)
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`.