Challenge: Matrix Row Means
Task
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
applyfunction to find the highest score for each student (each row in the matrix). - Use the
lapplyfunction to calculate the total sales for each store in thesales_list. - Use the
sapplyfunction to round each price inpricesto the nearest integer, and store the result in a variable calledrounded_prices.
Store your results in variables named:
student_highest_scoresfor the highest scores per student;store_total_salesfor the total sales per store;rounded_pricesfor the rounded product prices.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 2
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 5.56
Challenge: Matrix Row Means
Swipe to show menu
Task
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
applyfunction to find the highest score for each student (each row in the matrix). - Use the
lapplyfunction to calculate the total sales for each store in thesales_list. - Use the
sapplyfunction to round each price inpricesto the nearest integer, and store the result in a variable calledrounded_prices.
Store your results in variables named:
student_highest_scoresfor the highest scores per student;store_total_salesfor the total sales per store;rounded_pricesfor the rounded product prices.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 2
single