Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende Challenge: Mutate Customer Data | Data Manipulation with dplyr
Practice
Projects
Quizzes & Challenges
Cuestionarios
Challenges
/
Data Manipulation in R (Core)

bookChallenge: Mutate Customer Data

Tarea

Swipe to start coding

Practice using mutate() to add new columns for customer segmentation. Your goal is to create an age column and a segment column in the given data frame.

  • Add a new column age to the data frame, calculated as 2024 - birth_year.
  • Add a new column segment to the data frame, assigning "youth" if age is less than 25, "adult" if age is 25 or older but less than 65, and "senior" if age is 65 or older.

Solución

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 4
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: Mutate Customer Data

Desliza para mostrar el menú

Tarea

Swipe to start coding

Practice using mutate() to add new columns for customer segmentation. Your goal is to create an age column and a segment column in the given data frame.

  • Add a new column age to the data frame, calculated as 2024 - birth_year.
  • Add a new column segment to the data frame, assigning "youth" if age is less than 25, "adult" if age is 25 or older but less than 65, and "senior" if age is 65 or older.

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 1. Capítulo 4
single

single

some-alt