Reads the metadata about an IPUMS extract from a DDI file into R. Includes information about variable and value labels, terms of usage for the data and positions for the fixed-width file.

read_ipums_ddi(ddi_file, data_layer = NULL, lower_vars = FALSE)

Arguments

ddi_file

Filepath to DDI xml file

data_layer

If ddi_file is an extract with multiple DDIs, dplyr select-style notation indicating which .xml data layer to load.

lower_vars

Logical indicating whether to convert variable names to lowercase (default is FALSE due to tradition)

Value

An ipums_ddi object with metadata information.

See also

Other ipums_metadata: read_ipums_codebook

Examples

# Example extract DDI ddi_file <- ipums_example("cps_00006.xml") ddi <- read_ipums_ddi(ddi_file)