BaşlayınÜcretsiz Başlayın

Replacing and removing

In the last exercise, you saw that the phone column of sfo_survey is plagued with unnecessary parentheses and hyphens. The customer support team has requested that all phone numbers be in the format "123 456 7890". In this exercise, you'll use your new stringr skills to fulfill this request.

dplyr and stringr are loaded and sfo_survey is available.

Bu egzersiz

Cleaning Data in R

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Remove parentheses from phone column
phone_no_parens <- sfo_survey$phone %>%
  # Remove "("s
  ___(fixed(___)) %>%
  # Remove ")"s
  ___
Kodu Düzenle ve Çalıştır