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

Tarea

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.

Solución

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 2. Capítulo 6
single

single

Pregunte a AI

expand

Pregunte a AI

ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

close

bookChallenge: Write a Readable Pipeline

Desliza para mostrar el menú

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.

Tarea

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.

Solución

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 2. Capítulo 6
single

single

some-alt