Get information on your most recent extract for a given IPUMS data collection, returned as an ipums_extract object. For an overview of ipumsr API functionality, see vignette("ipums-api", package = "ipumsr").

get_last_extract_info(collection, api_key = Sys.getenv("IPUMS_API_KEY"))

Arguments

collection

The IPUMS data collection for the extract.

api_key

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

Value

An object of class ipums_extract containing information on your most recent extract.

See also

Examples

my_extract <- define_extract_micro("usa", "Example", "us2013a", "YEAR")

if (FALSE) {
submit_extract(my_extract)

# Oops, forgot to capture the return object from submit_extract. Grab it with:
submitted_extract <- get_last_extract_info("usa")

# View the extract number
submitted_extract$number

# Check if submitted extract is ready
is_extract_ready(submitted_extract) # returns TRUE or FALSE

# Or have R check periodically until the extract is ready
downloadable_extract <- wait_for_extract(submitted_extract)
}