summarize_samples: Summarize data across functions
Description
Summarize a numeric data frame based on specified grouping columns and a list
of functions. This is useful in summarizing a mild_df object from the
sample level to the instance level.
# S3 method for mild_df
summarize_samples(data, ...)
Value
A tibble with summarized data. There will be one row for each set
of distinct groups specified by group_cols. There will be one column for
each of the group_cols, plus length(.fns) columns for each of the
features in data, plus correlation columns if specified.
Arguments
data
A data.frame, 'mild_df' object, or similar of data to summarize.
group_cols
A character vector of column(s) that describe groups to
summarize across.
.fns
A list of functions (default list(mean = mean)).
cor
A logical (default FALSE) for whether to include correlations
between all features in the summarization.
...
Arguments passed to or from other methods.
Methods (by class)
summarize_samples(default): Method for data.frame-like objects.
summarize_samples(mild_df): Method for mild_df objects.