Description Usage Arguments Examples
Recode casualty_type variable from STATS19 data
1 | tc_recode_casualties(x, pattern = NULL, pattern_match = casualties_lookup)
|
x |
Character string to recode |
pattern |
A named character vector with values representing new values.
Has the form |
pattern_match |
Character string in the form of
|
1 2 3 4 5 6 7 8 9 | (x = stats19::casualties_sample$casualty_type)
tc_recode_casualties(x)
## Not run:
cas = stats19::get_stats19(2018, "casualties")
cas$casualty_type_simple = tc_recode_casualties(cas$casualty_type)
table(cas$casualty_type)
table(cas$casualty_type_simple)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.