Convenience wrapper around dplyr's collect() and
set_ipums_var_attributes(). Use this to attach variable labels when
collecting data from a database.
Usage
ipums_collect(data, ddi, var_attrs = c("val_labels", "var_label", "var_desc"))Arguments
- data
A dplyr
tblobject (generally atbl_lazyobject stored in a database).- ddi
An ipums_ddi object created with
read_ipums_ddi().- var_attrs
Variable attributes to add to the output. Defaults to all available attributes. See
set_ipums_var_attributes()for more details.
Value
A local tibble with the requested
attributes attached.
