DataThink Development
  • Modules
  • R Help
  • Resources
    • Course Textbook
    • R for Data Science
    • Git/GitHub and R
    • R Markdown: The Definitive Guide
    • Geocomputation with R

    • Supplemental Material
    • Happy Git and Github for the useR
    • plotly for R
    • Computing in R for Social Sciences
    • Statistical Concepts in Presenting Data:
    • Advanced R
    • R Packages
    • Tidy evaluation
    • Fundamentals of Data Visualization
    • Geocomputation with R
    • Crosstalk: htmlwidgets add-on

On this page

  • Task 11: Strings and grep
    • Background
    • Reading
    • Tasks

task-11

Task 11: Strings and grep

Background

Using global regular expression print (grep) and regular expressions (regex) to find character string patterns is a valuable tool in data analysis and is available with all operating systems and many different programming languages. It is a powerful tool once it is understood. The recently developed library(stringr) package makes these tools much easier to use. The three tasks below can be completed in many different ways. As a challenge, my code to complete this entire task less than 10 lines.

  • Course Website

Reading

This reading will help you complete the tasks below.

  • o Chapter 14: R for Data Science - Strings
  • o RVerbalExpressions package
  • o regexr.com (optional)
  • o Regular Expression examples (optional)
  • o Regular Expression support applet (optional)
  • o Regular Expression for R (optional)

Tasks