ns_add_labels {nettskjemar} | R Documentation |
Add Labels to Dataset
Description
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.
Usage
ns_add_labels(data, codebook)
Arguments
data |
data from |
codebook |
object from
|
Value
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"'.
Examples
## Not run:
data <- ns_get_data(11000)
cb <- ns_get_codebook(11000)
labeled_data <- ns_add_labels(data, cb)
## End(Not run)
[Package nettskjemar version 1.0.2 Index]