Regular expressions. How they can be cruel! Well we’re here to make them a tad easier. To do so we’re going to make use of the {stringr} package install.packages("stringr") library("stringr") We’re going to use the str_detect() and str_subset() functions. In particular the latter. These have the syntax function_name(STRING, REGEX_PATTERN) str_detect() is used to detect whether a string contains a certain pattern. At the most basic use of these functions, we can match strings of text.
regular
Recent Posts
- Shiny in Production: Sponsors
- Reproducible reports with Jupyter
- posit::conf(2023)
- Shiny in Production: Full speaker lineup
- Using Stan to analyse global UFO sighting reports
- Talks to watch at the RSS International Conference 2023
- Our ISO 27001 Certification
- Best Practices for Data Cleaning and Preprocessing
- SatRdays London 2023 - Recordings
- Generate multiple presentations with Quarto parameters