# \donttest{
# Add population data using ISO3 codes
df <- data.frame(country = c("USA", "CAN", "MEX"))
result <- add_population_column(df, id_column = "country")
# Add population data with specific dates
df <- data.frame(country = c("USA", "CAN"), year = c(2019, 2020))
result <- add_population_column(
df, id_column = "country", date_column = "year"
)
# }
Run the code above in your browser using DataLab