Maps UN M49 numeric area codes to ISO 3166-1 alpha-3 country codes
using the who_countries dataset shipped with DSIR. Counterpart
to iso3_to_m49() and used internally by sdg_clean() to populate
the iso3 column on SDG output.
Value
A character vector the same length as m49. Non-Member
codes (region aggregates, non-Member areas) return NA.
Details
M49 codes that do not correspond to a WHO Member State return NA.
This includes region / world aggregates (e.g. "900" for World,
"001" for World, "419" for Latin America and the Caribbean)
and codes for non-Member areas (e.g. Puerto Rico, Tokelau).
Input accepts either the zero-padded form ("076") or the bare
form ("76"); both are normalised before lookup. Non-numeric
input returns NA (with a single warning from the underlying
as.integer() coercion).