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

bookChallenge: Clean Messy Text Data

Tâche

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.

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 4
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

Suggested prompts:

Can you explain that in more detail?

What are the main benefits or drawbacks?

Can you give me an example?

close

bookChallenge: Clean Messy Text Data

Glissez pour afficher le menu

Tâche

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.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 4
single

single

some-alt