FANDOM


Summary by group Edit

summarise(mtcars, mean(disp))

summarise(group_by(mtcars, cyl), mean(disp))

summarise(group_by(mtcars, cyl), m = mean(disp), sd = sd(disp))

# With data frames, you can create and immediately use summaries

by_cyl <- mtcars %>% group_by(cyl) by_cyl %>% summarise(a = n(), b = a + 1)


Summaries Edit

Summaries