extract <- define_extract_nhgis(
datasets = ds_spec(
"1990_STF1",
data_tables = c("NP1", "NP2", "NP3"),
geog_levels = "county"
),
time_series_tables = list(
tst_spec("CW3", c("state", "county")),
tst_spec("CW5", c("state", "county"))
)
)
# Providing names of datasets or time series tables will remove them and
# all of their associated specifications from the extract:
remove_from_extract(
extract,
time_series_tables = c("CW3", "CW5")
)
# To remove detailed specifications from a dataset or time series table,
# use `ds_spec()` or `tst_spec()`. The named dataset or time series table
# will be retained in the extract, but modified by removing the indicated
# specifications:
remove_from_extract(
extract,
datasets = ds_spec("1990_STF1", data_tables = c("NP2", "NP3"))
)
# To make multiple modifications, use a list of `ds_spec()` or `tst_spec()`
# objects:
remove_from_extract(
extract,
time_series_tables = list(
tst_spec("CW3", geog_levels = "county"),
tst_spec("CW5", geog_levels = "state")
)
)
Run the code above in your browser using DataLab