powered by
Add ISO-3 Codes to Country Data
add_iso3_codes_column(df, id_column, target_column = "iso3_code")
A data frame with an additional column containing the ISO-3 code.
A data frame containing country identifiers.
Name of the column containing country identifiers.
Name of the output column. Defaults to "iso3_code".
# Convert country names to ISO3 codes df <- data.frame(name = c("United States", "Canada", "Mexico")) result <- add_iso3_codes_column(df, id_column = "name")
Run the code above in your browser using DataLab