| extract_tbl_to_list | R Documentation |
Convert a tbl_df (or data.frame) of extract
definitions, such as that returned by
get_recent_extracts_info_tbl, to a list of ipums_extract
objects. For an overview of ipumsr API functionality, see
vignette("ipums-api", package = "ipumsr").
extract_tbl_to_list(extract_tbl, validate = TRUE)
extract_tbl |
A |
validate |
Logical ( |
A list of length equal to the number of rows of extract_tbl.
Other ipums_api:
define_extract_from_json(),
define_extract_micro(),
download_extract(),
extract_list_to_tbl(),
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()
## Not run:
# Get tibble of recent extracts
tbl_of_last_10_extracts <- get_recent_extracts_info_tbl("usa")
# Filter down to extracts with "income" in the description
description_mentions_income <- grepl(
"[Ii]ncome",
tbl_of_last_10_extracts$description
)
income_extracts <- tbl_of_last_10_extracts[description_mentions_income, ]
# Convert tibble of extracts to list of extracts
income_extracts <- extract_tbl_to_list(income_extracts)
# Now it's easier to operate on those elements as extract objects:
revised_income_extract <- revise_extract_micro(
income_extracts[[1]],
samples_to_add = "us2018a"
)
submitted_revised_income_extract <- submit_extract(revised_income_extract)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.