View source: R/ns-data_labels.R
ns_add_labels | R Documentation |
The 'ns_add_labels' function applies labels to variables in a dataset based on a provided codebook. It assigns variable labels, value labels, and metadata required for the "ns-data" class.
ns_add_labels(data, codebook)
data |
data from |
codebook |
object from
|
A data frame with the same structure as 'data', but with variable and value labels applied. The resulting object is assigned the class '"ns-data"'.
## Not run:
data <- ns_get_data(11000)
cb <- ns_get_codebook(11000)
labeled_data <- ns_add_labels(data, cb)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.