Questions
Questions

COMM_V 205 101 102 103 2025W1 R Review Quiz

Multiple fill-in-the-blank

For each student (ie. ssid), find the average marks of the all courses taken. You are asked to have one average value for each student in the result. df2 <- student %>%   XXXX(sid) %>%   XXXX(ave_grade = mean(grade, na.rm = TRUE)) Please fill in the blanks below. df2 <- student %>%   [Fill in the blank] (sid) %>%   [Fill in the blank] (ave_grade = mean(grade, na.rm = TRUE))

View Explanation

View Explanation

Verified Answer
Please login to view
Step-by-Step Analysis
Examining the task, we want to compute the average grade per student (sid) using a dplyr pipeline. The two blanks must chain operations so that we first group by sid, then compute the per-group average of grade. Option analysis for the first blank: - group_by: This is the correct function to establish the per-group computation by sid. By grouping by sid, subsequent operations (like mean) are performed within each student group. - summarise: If used as the first blank, summarise would attempt to co......Login to view full explanation

Log in for full answers

We've collected over 50,000 authentic exam questions and detailed explanations from around the globe. Log in now and get instant access to the answers!

More Practical Tools for Students Powered by AI Study Helper

Join us and instantly unlock extensive past papers & exclusive solutions to get a head start on your studies!