`clean_countries` is used to adjust Natural Earth country names to match PEPFAR's Operatingunit / country. This function can also be used to shorten OU/Country names by setting the parameter short to TRUE.
clean_countries(.data, colname = "admin", language = "en", short = TRUE)
Arguments
- .data
Reference Datasets
- colname
Column name to be updated
- language
language of reference, default is set to `en`. Options are: `fr`, `de`, `es`, `ar`
- short
If TRUE, shorten OU/Country names instead, default is TRUE
Examples
if (FALSE) { # \dontrun{
library(sf)
library(rnaturalearth)
library(glamr)
spdf <- ne_countries(type = "sovereignty", scale = 110, returnclass = "sf") %>%
sf::st_drop_geometry() %>%
dplyr::select(sovereignt, admin, name, adm0_a3) %>%
glamr::clean_countries(colname = "admin") } # }