Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Challenge: Grouped Means with tapply | Apply Family Functions in R
Control Flow in R

bookChallenge: Grouped Means with tapply

Taak

Swipe to start coding

You are given a data frame with students' scores in three subjects and their class group. Complete the following steps:

  • Use vapply to calculate the median score for each subject (math, english, science).
  • Use tapply to compute the mean math score for each group (X and Y).

Store your results in variables named subject_medians (for the vapply result) and group_math_means (for the tapply result).

Oplossing

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 3. Hoofdstuk 4
single

single

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

Suggested prompts:

Can you explain this in simpler terms?

What are the main points I should remember?

Can you give me an example?

close

bookChallenge: Grouped Means with tapply

Veeg om het menu te tonen

Taak

Swipe to start coding

You are given a data frame with students' scores in three subjects and their class group. Complete the following steps:

  • Use vapply to calculate the median score for each subject (math, english, science).
  • Use tapply to compute the mean math score for each group (X and Y).

Store your results in variables named subject_medians (for the vapply result) and group_math_means (for the tapply result).

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 3. Hoofdstuk 4
single

single

some-alt