premium course

String Manipulation in R with stringr

Start Course For Free Play Trailer
  • 17 Videos
  • 60 Exercises
  • 4 hours 
  • 791 Participants
  • 5150 XP


Charlotte Wickham
Charlotte Wickham

Charlotte is an Assistant Professor in the Department of Statistics at Oregon State University and an avid R programmer with a passion for teaching. Her interests lie in spatiotemporal data, statistical graphics and computing, and environmental statistics.


Richie Cotton Richie Cotton

Tom Jeon Tom Jeon

Sumedh Panchadhar Sumedh Panchadhar

Course Description

Character strings can turn up in all stages of a data science project. You might have to clean messy string input before analysis, extract data that is embedded in text or automatically turn numeric results into a sentence to include in a report. Perhaps the strings themselves are the data of interest, and you need to detect and match patterns within them. This course will help you master these tasks by teaching you how to pull strings apart, put them back together and use stringr to detect, extract, match and split strings using regular expressions, a powerful way to express patterns.

More advanced matching and manipulation 

Now for two advanced ways to use regular expressions along with stringr: selecting parts of a match (a.k.a capturing) and referring back to parts of a match (a.k.a back-referencing). You'll also learn to deal with and strings or patterns that contain unicode characters (e.g. é).