Subset the results returned in Naomi output package

subset_naomi_output(
  naomi_output,
  area_id = NULL,
  area_level = NULL,
  sex = NULL,
  age_group = NULL,
  calendar_quarter = NULL,
  indicator = NULL,
  drop = FALSE,
  check_list = TRUE
)

Arguments

naomi_output

Naomi output object.

area_id

vector of area_ids to include/exclude.

area_level

vector of area_levels to include/exclude.

sex

vector of sexes to include/exclude.

age_group

vector of age_groups to include/exclude.

calendar_quarter

vector of calendar_quarters to include/exclude.

indicator

vector of indicators to include/exclude.

drop

logical whether to drop the supplied indices instead of keep only the supplied indices (default).

check_list

logical whether to check that supplied values are in the output package to be subsetted.

Value

A naomi output package with a subset of results.

Details

If arguemnts are NULL (default), no subsetting is done on that dimension.

By default the argument check_list = TRUE means an error will be thrown if any of the values in the vectors to subset are not found in the naomi_output object supplied. This might be set to FALSE for some batch processing applications, for example of the naomi_output could have already been partially subsetted.