Summer Deals - hours only!Up to 80% off on all courses and bundles.-Close
Strings basics
Regular expressions
Modifying strings
Summary

Instruction

Can we also choose countries with names ending in a certain letter or series of letters? We can! We'll use the $ sign, which matches the end of the string. To find all country names ending with an "a", we'd write:

cities[grepl("a$", cities)]

Exercise

Extract all country names that end with "Islands".