ipums_collect: Collect data into R session with IPUMS attributes

View source: R/utils.R

ipums_collectR Documentation

Collect data into R session with IPUMS attributes

Description

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 tbl object (generally a tbl_lazy object 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.


ipumsr documentation built on Sept. 12, 2024, 7:38 a.m.