Chapter 10 Strings
Learning Objectives
After completing this chapter, you will be able to:
- Combine, subset, and manipulate strings using stringr functions
- Match patterns in text using regular expressions
- Use character classes, quantifiers, and anchors to build flexible patterns
In Section 2.2, we have introduced the character vector that is consisted of strings. In this Chapter, we will introduce various kinds of operations we can do on strings using the stringr package, which is a subpackage of tidyverse.
At a glance – Chapter ROADMAP
Section 10.1. Basics: Concatenate and subset strings with
str_c()andstr_sub().
Section 10.2. Regex: Master regular expressions for flexible pattern matching and detection.