Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Challenge: Clean Messy Text Data | String Manipulation and Cleaning
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Working with Text, Dates, and Data Cleaning in R

bookChallenge: Clean Messy Text Data

Aufgabe

Swipe to start coding

You are managing a customer contact list that contains user-entered email addresses in various formats. Some emails are invalid, and valid emails use different domain names. Your goal is to clean this list by filtering out invalid emails and standardizing all valid email addresses to use the domain "company.com".

  • Use grepl() to filter only valid email addresses from the input vector.
  • Use gsub() to replace the domain of each valid email with "company.com".
  • Return a vector containing the cleaned, standardized email addresses.

Lösung

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 4
single

single

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

close

bookChallenge: Clean Messy Text Data

Swipe um das Menü anzuzeigen

Aufgabe

Swipe to start coding

You are managing a customer contact list that contains user-entered email addresses in various formats. Some emails are invalid, and valid emails use different domain names. Your goal is to clean this list by filtering out invalid emails and standardizing all valid email addresses to use the domain "company.com".

  • Use grepl() to filter only valid email addresses from the input vector.
  • Use gsub() to replace the domain of each valid email with "company.com".
  • Return a vector containing the cleaned, standardized email addresses.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 4
single

single

some-alt