Learn R Programming

ipumsr (version 0.5.2)

get_extract_info: Get information about a submitted extract

Description

Get information about a submitted extract via the IPUMS API. For an overview of ipumsr microdata API functionality, see vignette("ipums-api", package = "ipumsr").

Usage

get_extract_info(extract, api_key = Sys.getenv("IPUMS_API_KEY"))

Value

An ipums_extract object.

Arguments

extract

One of:

  • An ipums_extract object

  • The data collection and extract number formatted as a single string of the form "collection:number"

  • The data collection and extract number formatted as a vector of the form c("collection", "number")

The extract number does not need to be zero-padded (e.g., use "usa:1" or c("usa", "1"), not "usa:00001" or c("usa", "00001")). See Examples section below for examples of each form.

For a list of codes used to refer to each collection, see ipums_data_collections().

api_key

API key associated with your user account. Defaults to the value of environment variable "IPUMS_API_KEY".

See Also

Other ipums_api: add_to_extract(), define_extract_cps(), define_extract_from_json(), define_extract_usa(), download_extract(), extract_list_to_tbl(), extract_tbl_to_list(), get_last_extract_info(), get_recent_extracts_info, ipums_data_collections(), is_extract_ready(), remove_from_extract(), save_extract_as_json(), set_ipums_api_key(), submit_extract(), wait_for_extract()

Examples

Run this code
my_extract <- define_extract_usa("Example", "us2013a", "YEAR")

if (FALSE) {
submitted_extract <- submit_extract(my_extract)

# Get info by supplying an ipums_extract object:
get_extract_info(submitted_extract)

# Get info by supplying the data collection and extract number, as a string:
get_extract_info("usa:1")
# Note that there is no space before or after the colon, and no zero-padding
# of the extract number.

# Get info by supplying the data collection and extract number, as a vector:
get_extract_info(c("usa", "1"))
}

Run the code above in your browser using DataLab