📜  将参数传递给 group_by (2) - R 编程语言代码示例

📅  最后修改于: 2022-03-11 14:51:58.751000             🧑  作者: Mango

代码示例1
mytable <- function(x, group) {
  x %>% 
    group_by({{group}}) %>% 
    summarise(n = n())
}
mytable(iris, Species)