Filter by gavi groups
filter_gavi_group.Rd
This function takes a data frame, adds the grouping file and filters it by the specified group and filter values. It then removes the filter group.
Arguments
- data
A data frame. Required to have a column labeled iso3 with iso3 country codes.
- group
A group which is in groupings file.
- group_value
A value or vector to filter the data by. Must correspond to values found in the group variable.
- drop
defaults to TRUE, which drops the filter variable. Use FALSE if you wish to keep the filter varible.
Examples
groupings <- get_groupings("2022-11")
#> Error in charToDate(x): character string is not in a standard unambiguous format
wuenic %>%
filter_gavi_group(gavi57, 1)
#> Uh oh! You're missing the groupings file! Add it using get_groupings()
#> Error in UseMethod("select"): no applicable method for 'select' applied to an object of class "NULL"
wuenic %>%
filter_gavi_group(who_region, c("AFRO", "EMRO"))
#> Uh oh! You're missing the groupings file! Add it using get_groupings()
#> Error in UseMethod("select"): no applicable method for 'select' applied to an object of class "NULL"