powered by
Add Income Levels to Country Data
add_income_level_column( df, id_column, id_type = "iso3_code", target_column = "income_level" )
A data frame with a additional columns containing the income level ID and name.
A data frame containing country identifiers.
Name of the column containing country identifiers.
Type of country identifier. Defaults to "iso3_code".
Name of the output column. Defaults to "income_level".
# \donttest{ # Add income levels using ISO3 codes df <- data.frame(country = c("USA", "NGA", "IND")) result <- add_income_level_column(df, id_column = "country") # }
Run the code above in your browser using DataLab