extract_list_to_tbl: Convert a list of extract definitions to a tibble

View source: R/api.R

extract_list_to_tblR Documentation

Convert a list of extract definitions to a tibble

Description

Convert a list of ipums_extract objects to a tbl_df in which each row contains the definition of one extract. For an overview of ipumsr API functionality, see vignette("ipums-api", package = "ipumsr").

Usage

extract_list_to_tbl(extract_list)

Arguments

extract_list

A list of ipums_extract objects.

Value

A tbl_df with number of rows equal to the length of extract_list, in which each rows contains the definition of one extract.

See Also

Other ipums_api: define_extract_from_json(), define_extract_micro(), download_extract(), extract_tbl_to_list(), get_extract_info(), get_last_extract_info(), get_recent_extracts_info, ipums_data_collections(), is_extract_ready(), revise_extract_micro(), save_extract_as_json(), submit_extract(), wait_for_extract()

Examples

## Not run: 
# Get list of recent extracts
list_of_last_10_extracts <- get_recent_extracts_info_list("usa")

# Print the extract number for extracts that are downloadable:
for (extract in list_of_last_10_extracts) {
  if (is_extract_ready(extract)) print(extract$number)
}

# Convert list of extracts to tibble of extracts to view in a tabular format
extract_list_to_tbl(list_of_last_10_extracts)

## End(Not run)


mnpopcenter/ripums documentation built on Sept. 30, 2022, 6:57 a.m.