Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Challenge: Write a Readable Pipeline | Pipes and Chaining Operations
Practice
Projects
Quizzes & Challenges
Visat
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.

Tehtävä

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.

Ratkaisu

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 2. Luku 6
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

close

bookChallenge: Write a Readable Pipeline

Pyyhkäise näyttääksesi valikon

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.

Tehtävä

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.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 2. Luku 6
single

single

some-alt