parent
b5aa2a7fcd
commit
2985b6d617
4
tidy.Rmd
4
tidy.Rmd
|
@ -260,7 +260,7 @@ So far you've learned how to tidy `table2` and `table4`, but not `table3`. `tabl
|
||||||
table3
|
table3
|
||||||
```
|
```
|
||||||
|
|
||||||
The `rate` column contains both `cases` and `population` variable, and we need to split it into two variabes. `separate()` takes the name of the column to separate, and the names of the columns to separate into, as shown in \@ref(fig:tidy-separate) and the code below.
|
The `rate` column contains both `cases` and `population` variables, and we need to split it into two variables. `separate()` takes the name of the column to separate, and the names of the columns to separate into, as shown in \@ref(fig:tidy-separate) and the code below.
|
||||||
|
|
||||||
```{r}
|
```{r}
|
||||||
table3 %>%
|
table3 %>%
|
||||||
|
@ -296,7 +296,7 @@ table3 %>%
|
||||||
|
|
||||||
### Unite
|
### Unite
|
||||||
|
|
||||||
`unite()` is inverse of `separate()`: it combines multiple columns into a single column. You'll need it much less frequently that `separate()`, but it's still a useful tool to have in your back pocket.
|
`unite()` is inverse of `separate()`: it combines multiple columns into a single column. You'll need it much less frequently than `separate()`, but it's still a useful tool to have in your back pocket.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue