my_extract <- define_extract_micro(
collection = "cps",
description = "2018-2019 CPS Data",
samples = c("cps2018_05s", "cps2019_05s"),
variables = c("SEX", "AGE", "YEAR")
)
if (FALSE) {
# Store your submitted extract request to obtain the extract number
submitted_extract <- submit_extract(my_extract)
submitted_extract$number
# This is useful for checking the extract request status
get_extract_info(submitted_extract)
# You can always get the latest status, even if you forget to store the
# submitted extract request object
submitted_extract <- get_last_extract_info("cps")
# You can also check if submitted extract is ready
is_extract_ready(submitted_extract)
# Or have R check periodically and download when ready
downloadable_extract <- wait_for_extract(submitted_extract)
}
Run the code above in your browser using DataLab