if (FALSE) {
# Assign so as to save on API calls - recommended
countries_dataframe <- show_countries()
country <- "Australia"
country_input_type(country, countries_dataframe)
# [1] "country_name"
country <- "AU"
country_input_type(country, countries_dataframe)
# [1] "iso2Code"
country <- "something other than a valid country name or iso2Code"
country_input_type(country, countries_dataframe)
# [1] "invalid"
}
Run the code above in your browser using DataLab