Is there a way to summarise
in dplyr
(or with other code) on the same column without having to specify the column each time like this?
summarise(temp1, earliest=min(ArrDelay), average= mean(ArrDelay), latest=(ArrDelay))
Is there a way to summarise
in dplyr
(or with other code) on the same column without having to specify the column each time like this?
summarise(temp1, earliest=min(ArrDelay), average= mean(ArrDelay), latest=(ArrDelay))
You can use summarise_each
, which can take a funs
argument:
summarise_each(iris, funs(earliest = min, average = mean, latest = max), Sepal.Length)
#
# earliest average latest
# 1 4.3 5.843333 7.9