emoji_flag() turns a region code into its flag and a flag into its code,
element by element: "JP" becomes the Japanese flag, the Japanese flag
becomes "JP", and "GB-SCT" and Scotland's flag convert the same way.
Codes are matched without regard to case.
Value
A character vector the same length as x: flags where x held
codes, codes where it held flags, and NA for anything that is neither.
Details
Each element is converted in its own direction, so one call can carry
both. A code or a flag outside the catalogue's valid set, such as "XX",
"UK" (the code is GB) or a stray indicator pair, gives NA rather than a
made-up flag. The valid set is the 259 country flags and three subdivision
flags of the catalogue emoji_unicode_version() reports; see
emoji_country() for which of the 259 are not countries.