summarize: Reduce multiple values down to a single value

Description Usage Arguments Value Examples

Description

Create one or more scalar variables summarizing the variables of an existing tbl. Tbls with groups created by group_by() will result in one row in the output for each group. Tbls with no groups will result in one row.

Usage

1
2
3
4
5
6
## S3 method for class 'FDF'
summarise(.data, ...)

summarize(.data, ...)

summarise(.data, ...)

Arguments

.data

A FDF.

...

Name-value pairs of summary functions. The name will be the name of the variable in the result. The value should be an expression that returns a single value like min(x), n(), or sum(is.na(y)).

The arguments in ... are automatically quoted and evaluated in the context of the data frame. They support unquoting and splicing. See vignette("programming") for an introduction to these concepts.

Value

A tibble with group values and summarized values.

Examples

1
2
3
4
5
6
7
8
9
test <- FDF(datasets::iris)
test %>%
  group_by(Species) %>%
  summarize(mean = mean(Sepal.Length), n = n())

# You can also get a list-column
test %>%
  group_by(Species) %>%
  summarize(range = range(Sepal.Length))

privefl/bigdfr documentation built on May 20, 2019, 9:39 a.m.