summarize_ifx: generalized summarize_if / summarize_at / summarize_all

Description Usage Arguments

Description

takes the features of summarize_if and summarize_at, in case we want to combine both, and supports a formula or function for the .at parameter, which will be applied on names. Also supports grouping through .by.

Usage

1
2
summarize_ifx(.tbl, .funs, ..., .at = names(.tbl), .if = ~TRUE,
  .by = NULL)

Arguments

.tbl

A tbl object.

.funs

List of function calls generated by funs(), or a character vector of function names, or simply a function.

Bare formulas are passed to rlang::as_function() to create purrr-style lambda functions. Note that these lambda prevent hybrid evaluation from happening and it is thus more efficient to supply functions like mean() directly rather than in a lambda-formula.

...

Additional arguments for the function calls in .funs. These are evaluated only once, with tidy dots support.

.at

equivalent of .vars in mutate_at, but enhanced

.if

equivalent of .predicate in mutate_if

.by

a vector or list of variables as characters or given by vars


moodymudskipper/tidyx documentation built on May 17, 2019, 10:39 a.m.