Shorten country names

prettyc(x)

Arguments

x

(character())
Country names, e.g. from country_names().

Examples

cn <- c(
  "Macedonia, the former Yugoslav Republic of",
  "Congo, the Democratic Republic of the",
  "Tanzania, United Republic of")
prettyc(cn)
#> [1] "North Macedonia" "DR Congo"        "Tanzania"