Create scalar valued summary features for a dataset from feature functions.

features(.tbl, .var, features, ...)

features_at(.tbl, .vars, features, ...)

features_all(.tbl, features, ...)

features_if(.tbl, .predicate, features, ...)

Arguments

.tbl

A dataset

.var, .vars

The variable(s) to compute features on

features

A list of functions (or lambda expressions) for the features to compute. feature_set() is a useful helper for building sets of features.

...

Additional arguments to be passed to each feature. These arguments will only be passed to features which use it in their formal arguments (base::formals()), and not via their .... While passing na.rm = TRUE to stats::var() will work, it will not for base::mean() as its formals are x and .... To more precisely pass inputs to each function, you can use lambdas in the list of features (~ mean(., na.rm = TRUE)).

.predicate

A predicate function (or lambda expression) to be applied to the columns or a logical vector. The variables for which .predicate is or returns TRUE are selected.

Details

Lists of available features can be found in the following pages: