是否可以在同一列的summarise
(或其他代码)中使用dplyr
,而无需每次都指定列?
summarise(temp1, earliest=min(ArrDelay), average= mean(ArrDelay), latest=(ArrDelay))
答案 0 :(得分:6)
您可以使用summarise_each
,可以使用funs
参数:
summarise_each(iris, funs(earliest = min, average = mean, latest = max), Sepal.Length)
#
# earliest average latest
# 1 4.3 5.843333 7.9