Better naming consistency (#621)
Now 'key' is used commonly across step-by-step guide, final complex pipe, and the exercise.
This commit is contained in:
parent
0d7ba63f77
commit
8fee078c9d
6
tidy.Rmd
6
tidy.Rmd
|
@ -526,9 +526,9 @@ I've shown you the code a piece at a time, assigning each interim result to a ne
|
|||
|
||||
```{r, results = "hide"}
|
||||
who %>%
|
||||
gather(code, value, new_sp_m014:newrel_f65, na.rm = TRUE) %>%
|
||||
mutate(code = stringr::str_replace(code, "newrel", "new_rel")) %>%
|
||||
separate(code, c("new", "var", "sexage")) %>%
|
||||
gather(key, value, new_sp_m014:newrel_f65, na.rm = TRUE) %>%
|
||||
mutate(key = stringr::str_replace(key, "newrel", "new_rel")) %>%
|
||||
separate(key, c("new", "var", "sexage")) %>%
|
||||
select(-new, -iso2, -iso3) %>%
|
||||
separate(sexage, c("sex", "age"), sep = 1)
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue