ipums_var_info | R Documentation |
Get IPUMS metadata information about variables loaded into R. Will try to read the metadata from the loaded datasets, but it is more reliable to load the DDI into a separate object and use it instead.
ipums_var_info(object, vars = NULL) ipums_var_desc(object, var = NULL) ipums_var_label(object, var = NULL) ipums_val_labels(object, var = NULL)
object |
A DDI object (loaded with |
vars |
dplyr |
var |
select-style notation for a single variable
Note that many R functions drop attributes that provide this information.
In order to make sure that they are available, it is best to keep a copy of the
separate from the data your are manipulating using |
ipums_var_info
returns a tbl_df
data frame with variable information, and
the other functions return a length 1 character vector.
ddi <- read_ipums_ddi(ipums_example("cps_00006.xml")) ipums_var_info(ddi) ipums_var_desc(ddi, MONTH) ipums_var_label(ddi, MONTH) ipums_val_labels(ddi, MONTH)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.