copy_lab | R Documentation |
copy_lab
copy the variable label and value labels or returns
old_var
to
variable new_var
and return new_var
.
copy_lab(new_var, old_var, strict = TRUE)
new_var |
Variable to be copied to. |
old_var |
Variable to be copied from. |
strict |
Should the variables should be the same |
copy_lab
returns new_var
with same variable label
and value labels as old_var
.
var_with_lab <- rep(1:2, 5)
var_lab(var_with_lab) <- "Income"
val_lab(var_with_lab) <- c("Low" = 1, "High" = 2)
var_nolab <- rep(1:2, 10)
var_ut <- copy_lab(var_nolab, var_with_lab)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.