Seksjon 1. Kapittel 8
single
Challenge: Grouped Data
Sveip for å vise menyen
Oppgave
Sveip for å begynne å kode
Group a tibble by a categorical variable and calculate the mean of a numeric column for each group.
- Group the tibble
dfby the column specified bygroup_col. - For each group, calculate the mean of the column specified by
num_col. - Return a tibble with one row per group and a column named
mean_valuecontaining the mean for each group.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 8
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår