Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Grades Summary | Factors
R Introduction

bookChallenge: 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:

  1. Use the summary() function on grades_f to display the number of occurrences of each grade.
  2. 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 on grades_f.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 6
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

close

Awesome!

Completion rate improved to 2.27

bookChallenge: 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:

  1. Use the summary() function on grades_f to display the number of occurrences of each grade.
  2. 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 on grades_f.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 6
single

single

some-alt