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

bookChallenge: Mutate Customer Data

Tehtävä

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.

Ratkaisu

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 4
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

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

close

bookChallenge: Mutate Customer Data

Pyyhkäise näyttääksesi valikon

Tehtävä

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.

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 1. Luku 4
single

single

some-alt