countryEndsWith {r2country} | R Documentation |
Fetch countries that ends with specified characters
Description
Subset and return countries given a specified characters to search
Usage
countryEndsWith(char, full.list = TRUE)
Arguments
char |
character to search for |
full.list |
whether to return only name of country or full list |
Value
country data list matching a specified character
See Also
[countryStartsWith()] for country search starting with specified characters, and [countryHas()] for countries that contain specified characters.
Examples
# task 1: get only names of countries that end with "A" or "a"
# note that the search in case-insensitive
countryEndsWith("A", full.list = FALSE)
# task 2: get only names of countries that end with "No" or "no"
countryEndsWith("no", full.list = FALSE)
# task 3: repeat task 2, but return full list for each country
countryEndsWith("no")
[Package r2country version 2.0.2.3.1 Index]