# task 1: get only language names that ends with "EN" or "en"
# note that the search in case-insensitive
languageEndsWith("eN", full.list = FALSE)
# task 2: get only language names that ends with "chi"
languageEndsWith("chi", full.list = FALSE)
# task 3: repeat task 2, but return full list for each country with the language
languageEndsWith("sin", full.list = TRUE)
# searching text with no results
languageEndsWith("er", full.list = FALSE)
Run the code above in your browser using DataLab