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

bookChallenge: Grouped Means with tapply

Tarefa

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).

Solução

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 4
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

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

Deslize para mostrar o menu

Tarefa

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).

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 4
single

single

some-alt