data_label | R Documentation |
For each column of x
, this function checks whether value
labels exist in value_labels
. If so, integer values are replaced with these
value labels.
data_label(
x,
variables = names(x),
value_labels = read_yaml(paste0("value_labels_", substitute(x), ".yml"))
)
x |
A |
variables |
Column names of |
value_labels |
A list with value labels, typically read from metadata
generated by |
A data.frame
.
## Not run:
if(interactive()){
labs <- list(x = list(class = "factor", `1` = "a", `2` = "b"))
df <- data.frame(x = 1:2)
data_label(df, value_labels = labs)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.