题目
COMM_V 205 101 102 103 2025W1 R Review Quiz
多项填空题
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))
查看解析
标准答案
Please login to view
思路分析
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登录即可查看完整答案
我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。
类似问题
df_c<- student %>% group_by(sid, year) %>% summarise(min_grade = min(grade), ave_min_grade = mean(min_grade)) df_d<- student %>% group_by(sid, year) %>% summarise(min_grade = min(grade)) %>% summarise(ave_min_grade = mean(min_grade)) Number of rows in df_c is different from that in df_d. There are 4 columns in df_c while there are 2 columns in df_d.
For each student (ie. `sid`), 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))
In a consumer society, many adults channel creativity into buying things
Economic stress and unpredictable times have resulted in a booming industry for self-help products
更多留学生实用工具
希望你的学习变得更简单
加入我们,立即解锁 海量真题 与 独家解析,让复习快人一步!