Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте 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

Завдання

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.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 4
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

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

Свайпніть щоб показати меню

Завдання

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.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 4
single

single

some-alt