我有4个不同大小的列名向量
我尝试做
col.avg <- c("mpg","wt","hp")
col.max <- c("mpg","hp","wt","qsec")
col.min <- c("mpg","hp","wt","qsec")
col.group <- c("cyl","vs","am","gear","carb")
test<- mtcars %>%
group_by(.dots = col.group) %>%
summarize_at(.vars = col.min, .funs = c(min= "min")) %>%
summarize_at(.vars = col.mean, .funs = c(mean= "mean")) %>%
summarize_at(.vars = col.max, .funs = c(max= "max"))
设置了mtcars的,但它不允许我输入多个summary_at字符串。有什么办法可以将summary_at合并为一个?