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

single

bookChallenge: Transforming and Recoding Variables

Glissez pour afficher le menu

Tâche

Glissez pour commencer à coder

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.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 8
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

some-alt