#Use countrycode function to convert countrynames to ISO-2 char codes countrycode::countrycode(sourcevar = c("United Kingdom", "Malaysia"), origin = "country.name", destination = "iso2c")