sjmisc_get_labels | R Documentation |
sjmisc 1.8 hack, value labels
sjmisc_get_labels(
x,
attr.only = FALSE,
include.values = NULL,
include.non.labelled = FALSE
)
include.values, how values are returned: NULL = unnamed vector; as named vector = "as.name" or "n"; "as.prefix" or "p", c("[1] Caucasian", "[3] Asian")
attr.only = T, only search attributes, T desired (if F, also search factor levels, character strings)
include.non.labelled, if T, values without labels will also be included in the returned labels
returns NULL if no value labels attribute
returned vector values are the labels with vector names being initial values in x. This is flipped as you would get directly from attr(,"labels",exact=T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.