Challenge: Grades Summary
Opgave
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.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 26
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Fantastisk!
Completion rate forbedret til 2.27
Challenge: Grades Summary
Stryg for at vise menuen
Opgave
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.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 26
single