powered by
Add Short Names to Country Data
add_short_names_column(df, id_column, target_column = "name_short")
A data frame with an additional column containing the short names.
A data frame containing country identifiers.
Name of the column containing country identifiers.
Name of the output column. Defaults to "name_short".
# Add short names using ISO3 codes df <- data.frame(country = c("USA", "FRA", "JPN")) result <- add_short_names_column(df, id_column = "country")
Run the code above in your browser using DataLab