Sezione 1. Capitolo 8
single
Challenge: 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 thescoredivided by 100. - Create a new variable,
group_label, usingcase_when()to recode thegroupvariable: "A" becomes "Control", "B" becomes "Treatment", and any other value becomes "Unknown". - Return the resulting data frame with the new variables.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 8
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione