Challenge: Grades Summary
Task
Swipe to start coding
You have a factor vector, grades_f, which assigns each numeric grade into one of five categories ('F', 'D', 'C', 'B', 'A'). Your goal is to:
- Use the
summary()function ongrades_fto display the number of occurrences of each grade. - Compute the relative frequency of each grade by dividing the counts from the previous step by the total number of grades. To find the total, call the
length()function ongrades_f.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 26
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 2.27
Challenge: Grades Summary
Swipe to show menu
Task
Swipe to start coding
You have a factor vector, grades_f, which assigns each numeric grade into one of five categories ('F', 'D', 'C', 'B', 'A'). Your goal is to:
- Use the
summary()function ongrades_fto display the number of occurrences of each grade. - Compute the relative frequency of each grade by dividing the counts from the previous step by the total number of grades. To find the total, call the
length()function ongrades_f.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 26
single