Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Challenge: Transforming and Recoding Variables | Data Cleaning and Wrangling Essentials
Data Cleaning and Wrangling in R
Sezione 1. Capitolo 8
single

single

bookChallenge: Transforming and Recoding Variables

Scorri per mostrare il menu

Compito

Scorri per iniziare a programmare

Practice transforming and recoding variables in a simulated dataset using mutate() and case_when().

  • Use mutate() to create a new variable, score_scaled, which is the score divided by 100.
  • Create a new variable, group_label, using case_when() to recode the group variable: "A" becomes "Control", "B" becomes "Treatment", and any other value becomes "Unknown".
  • Return the resulting data frame with the new variables.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 8
single

single

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

some-alt