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

Tarefa

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.

Solução

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 6
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

close

bookChallenge: Write a Readable Pipeline

Deslize para mostrar o menu

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.

Tarefa

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.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 6
single

single

some-alt