Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Conditional Transformations | Core R Data Structures for EDA
/
Essential R Data Structures for Exploratory Data Analysis
Seksjon 1. Kapittel 28
single

single

bookChallenge: Conditional Transformations

Sveip for å vise menyen

Oppgave

Sveip for å begynne å kode

Practice applying conditional logic to transform a column in a data frame. You will create a new column based on a condition applied to an existing numeric column.

  • Create a new column named category in the input data frame.
  • For each row, assign "high" to category if the value in the value column is greater than 10.
  • Otherwise, assign "low" to category.
  • Return the modified data frame.

Løsning

Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 28
single

single

Spør AI

expand

Spør AI

ChatGPT

Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår

some-alt