summarise.list: Reduces multiple values down to a single value

Description Usage Arguments Examples

Description

Reduces multiple values down to a single value

Usage

1
2
## S3 method for class 'list'
summarise(.data, ..., gather = unlist_with_nas, warn = FALSE)

Arguments

.data

a list.

...

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

gather

before calculating the summaries, each variable is first passed through the gather function. Common choices for gather are unlist, or unlist_with_nas. If data is to be taken as-is, use identity function.

warn

if FALSE (default) it ignores the warnings throwed by purrr's transpose.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
as_lol(mtcars) %>%
  summarise(
    avg_mpg = mean(mpg),
    max_cyl = max(cyl),
    n = length(cyl)
  )

as_lov(mtcars) %>%
  group_by(gear) %>%
  summarise(
    avg_mpg = mean(mpg),
    n = length(cyl)
  )

twolodzko/lolplyr documentation built on May 14, 2019, 8:22 a.m.