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

bookChallenge: Matrix Row Means

Tarefa

Swipe to start coding

You are given three different data objects: a matrix of student scores, a list of monthly sales for stores, and a vector of product prices.

  • Use the apply function to find the highest score for each student (each row in the matrix).
  • Use the lapply function to calculate the total sales for each store in the sales_list.
  • Use the sapply function to round each price in prices to the nearest integer, and store the result in a variable called rounded_prices.

Store your results in variables named:

  • student_highest_scores for the highest scores per student;
  • store_total_sales for the total sales per store;
  • rounded_prices for the rounded product prices.

Solução

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 2
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

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

close

bookChallenge: Matrix Row Means

Deslize para mostrar o menu

Tarefa

Swipe to start coding

You are given three different data objects: a matrix of student scores, a list of monthly sales for stores, and a vector of product prices.

  • Use the apply function to find the highest score for each student (each row in the matrix).
  • Use the lapply function to calculate the total sales for each store in the sales_list.
  • Use the sapply function to round each price in prices to the nearest integer, and store the result in a variable called rounded_prices.

Store your results in variables named:

  • student_highest_scores for the highest scores per student;
  • store_total_sales for the total sales per store;
  • rounded_prices for the rounded product prices.

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 2
single

single

some-alt