Challenge: Clean Messy Text Data
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.
Рішення
Дякуємо за ваш відгук!
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Can you explain that in more detail?
What are the main benefits or drawbacks?
Can you give me an example?
Чудово!
Completion показник покращився до 5
Challenge: Clean Messy Text Data
Свайпніть щоб показати меню
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.
Рішення
Дякуємо за ваш відгук!
single