summarize a data frame by the summarizeTerms. Accepts arbitrary text as summarizeTerms to allow forms such as "mean(Sepal.Length)".

summarize_se(.data, summarizeTerms, ..., warn = TRUE, env = parent.frame())

summarise_se(.data, summarizeTerms, ..., warn = TRUE, env = parent.frame())

Arguments

.data

data.frame

summarizeTerms

character vector of column expressions to summarize by.

...

force later terms to be bound by name

warn

logical, if TRUE warn about possible name collisions.

env

environment to work in.

Value

.data with summarizeTerms summarization applied.

See also

Examples

# good datasets::iris %.>% summarize_se(., qae(Mean_Sepal_Length := mean(Sepal.Length), Max_Sepal_Length := max(Sepal.Length)))
#> Mean_Sepal_Length Max_Sepal_Length #> 1 5.843333 7.9
# good datasets::iris %.>% summarize_se(., qae(Sepal.Length := mean(Sepal.Length)))
#> Sepal.Length #> 1 5.843333
# intentionally generates a warning datasets::iris %.>% summarize_se(., qae(Sepal.Length := mean(Sepal.Length), Max_Sepal_Length := max(Sepal.Length)))
#> Warning: seplyr::summarize_se possibly confusing column name re-use c('Sepal.Length' = 'mean(Sepal.Length)', 'Max_Sepal_Length' = 'max(Sepal.Length)')
#> Sepal.Length Max_Sepal_Length #> 1 5.843333 5.843333