summarise()
is typically used on grouped data created by group_by()
.
The output will have one row for each group.
# S3 method for FDF summarise(.data, ...) summarize(.data, ...) summarise(.data, ...)
.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 These arguments are automatically quoted and
evaluated in the context of the data
frame. They support unquoting and
splicing. See |
A tibble with group values and summarized values.
#> # A tibble: 3 x 2 #> Species mean #> <chr> <dbl> #> 1 setosa 5.01 #> 2 versicolor 5.94 #> 3 virginica 6.59# You can also get a list-column test %>% group_by(Species) %>% summarize(range = range(Sepal.Length))#> # A tibble: 3 x 2 #> Species range #> <chr> <list> #> 1 setosa <dbl [2]> #> 2 versicolor <dbl [2]> #> 3 virginica <dbl [2]>