Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Write a Readable Pipeline | Pipes and Chaining Operations
Practice
Projects
Quizzes & Challenges
Вікторини
Challenges
/
Data Manipulation in R (Core)

bookChallenge: Write a Readable Pipeline

You have learned how to use pipes to streamline your data manipulation code and how best practices like clear formatting and comments can make pipelines much easier to read and maintain. Now, you will put these skills to the test by refactoring a messy and hard-to-follow pipeline into a clean, well-documented sequence of operations for a realistic data cleaning scenario. This exercise will challenge you to apply everything you have learned about writing readable, professional pipelines in R.

Завдання

Swipe to start coding

Refactor the provided messy pipeline so that it is clean, readable, and well-commented for the given customer data cleaning scenario.

  • Remove rows where customer_id is missing.
  • Trim whitespace from first_name and last_name columns.
  • Filter to keep only rows where status is "active".
  • Create a new column full_name by combining first_name and last_name.
  • Arrange the rows by signup_date in descending order.

Рішення

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

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

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

Секція 2. Розділ 6
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

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

close

bookChallenge: Write a Readable Pipeline

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

You have learned how to use pipes to streamline your data manipulation code and how best practices like clear formatting and comments can make pipelines much easier to read and maintain. Now, you will put these skills to the test by refactoring a messy and hard-to-follow pipeline into a clean, well-documented sequence of operations for a realistic data cleaning scenario. This exercise will challenge you to apply everything you have learned about writing readable, professional pipelines in R.

Завдання

Swipe to start coding

Refactor the provided messy pipeline so that it is clean, readable, and well-commented for the given customer data cleaning scenario.

  • Remove rows where customer_id is missing.
  • Trim whitespace from first_name and last_name columns.
  • Filter to keep only rows where status is "active".
  • Create a new column full_name by combining first_name and last_name.
  • Arrange the rows by signup_date in descending order.

Рішення

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

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

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

Секція 2. Розділ 6
single

single

some-alt