summarise

0th

Percentile

Summarise multiple values to a single value.

Summarise multiple values to a single value.

Usage
summarise(.data, ...)

summarise_(.data, ..., .dots)

summarize(.data, ...)

summarize_(.data, ..., .dots)

Arguments
.data
A tbl. All main verbs are S3 generics and provide methods for tbl_df, tbl_dt and tbl_sql.
...
Name-value pairs of summary functions like min(), mean(), max() etc.
.dots
Used to work around non-standard evaluation. See vignette("nse") for details.
Value

An object of the same class as .data. One grouping level will be dropped.

Data frame row names are silently dropped. To preserve, convert to an explicit variable.

See Also

Other single.table.verbs: arrange, arrange_; filter, filter_; mutate, mutate_, transmute, transmute_; rename, rename_, select, select_; slice, slice_

Aliases
  • summarise
  • summarise_
  • summarize
  • summarize_
Examples
summarise(mtcars, mean(disp))
summarise(group_by(mtcars, cyl), mean(disp))

summarise(group_by(mtcars, cyl), m = mean(disp), sd = sd(disp))
Documentation reproduced from package dplyr, version 0.3, License: MIT + file LICENSE

Community examples

cielo_azzuro at Aug 4, 2019 dplyr v0.7.8

summarize(titanic, mean = mean(Age, na.rm=TRUE), sd = sd(Age, na.rm=TRUE)) The command above will generate a summary that includes the mean and standard deviation of the age of passengers in the freely-available Titanic data set. The argument na.rm=True ensures that empty cells are not included in the mean() and sd() calculations.