As has been mentioned by several folks, mutate_each()
and summarise_each()
are deprecated in favour of the new across()
function.
Answer as of dplyr
version 1.0.5:
df %>%
group_by(sex) %>%
summarise(across(everything(), mean))
Original answer:
dplyr
now has summarise_each
:
df %>%
group_by(sex) %>%
summarise_each(funs(mean))
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…