50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


r2country (version 2.0.2.4.0)

languageHas: Fetch countries data based on official language prefix

Description

Obtain country data matching language first one or more letters

Usage

languageHas(char, full.list = TRUE)

Value

country data list matching content from a specified character

Arguments

char

character to search for

full.list

whether to return only name of country or full list

See Also

countryStartsWith for country search starting with specified characters, and [countryEndsWith()] for countries that end with a specified characters.

Examples

Run this code
# task 1: get only names of countries that contains with "ER" or "er"
# note that the search in case-insensitive
countryHas("er", full.list = FALSE)

# task 2: get only names of countries that contains with "LAND" or "lAND" or "land"
countryHas("lAND", full.list = FALSE)

# task 3: repeat task 2, but return full list for each country
countryHas("many", full.list = TRUE)

Run the code above in your browser using DataLab