CommencerCommencer gratuitement

Detecting inconsistent text data

You've recently received some news that the customer support team wants to ask the SFO survey participants some follow-up questions. However, the auto-dialer that the call center uses isn't able to parse all of the phone numbers since they're all in different formats. After some investigation, you found that some phone numbers are written with hyphens (-) and some are written with parentheses ((,)). In this exercise, you'll figure out which phone numbers have these issues so that you know which ones need fixing.

dplyr and stringr are loaded, and sfo_survey is available.

Cet exercice fait partie du cours

Cleaning Data in R

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Filter for rows with "-" in the phone column
sfo_survey %>%
  filter(___)
Modifier et exécuter le code