Convenience wrapper around dplyr collect and set_ipums_var_attributes.

ipums_collect(data, ddi, var_attrs = c("val_labels", "var_label", "var_desc"))

Arguments

data

A dplyr tbl object (generally a tbl_lazy object stored in a database.

ddi

A DDI object, read with read_ipums_ddi.

var_attrs

One or more of val_labels, var_label and var_desc describing what kinds of attributes you want to add. If NULL, will not add any attributes.

Value

A local tbl_df data.frame with IPUMS attributes attached