translate | R Documentation |
Translate columns from code to names in data.frame
translate(.tbl, .var, trans_vec, simple = FALSE, ...)
.tbl |
A tbl object. |
.var |
A unquoted column name to translate. |
trans_vec |
A named tranlation vector. Codes as names. |
simple |
if TRUE simplyfied by |
... |
further arguments to |
tbl <- tibble::tibble(geo = c("FI", "SE"))
t_geo <- c(FI = "Suomi", SE = "Ruotsi")
translate(tbl, geo, t_geo)
translate(tibble::tibble(vars = c("nulc", "nulc_va", "nulc_hw", "nulc_hw_va", "nulc_aper", "nulc_aper_va")),
vars, var_labels_fi, simple = TRUE, parts = c(3, 4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.