Create one or more scalar variables summarising the variables of an existing data.frame. Grouped data.frames will result in one row in the output for each group.

summarise(.data, ...)

summarize(.data, ...)

Arguments

.data

A data.frame.

...

Name-value pairs of summary functions. The name will be the name of the variable in the result.

The value can be:

Details

summarise() and summarize() are synonyms.

Examples

summarise(mtcars, mean(mpg))
#> mean(mpg) #> 1 20.09062
summarise(mtcars, meanMpg = mean(mpg), sumMpg = sum(mpg))
#> meanMpg sumMpg #> 1 20.09062 642.9
mtcars %>% summarise(mean(mpg))
#> mean(mpg) #> 1 20.09062