Description Usage Arguments Value Examples
View source: R/get_spss_label.R
Returns variable labels from an SPSS dataset read in with either the foreign
or haven
packages.
1 | get_spss_label(df, var, null_label = "No label found", unlist = TRUE)
|
df |
An SPSS dataset originally read into R via either |
var |
|
null_label |
|
unlist |
Should the output be converted from a list to a vector? Defaults to
|
The SPSS label/s, as a vector or a list.
1 2 3 4 | get_spss_label(dec13_excerpt, "q1")
get_spss_label(dec13_excerpt, c("q1", "party"))
get_spss_label(dec13_excerpt, c("q1", "sdfklsdf", "party"), null_label = "here be dragons")
get_spss_label(dec13_excerpt, c("q1", "sdfklsdf", "party"), unlist = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.