aggregate_grouped_df {MAPCtools} | R Documentation |
Aggregate grouped data using aggregate_df
Description
Aggregates a grouped data frame into summarizing statistics within groups by
applying the aggregate_df
function to each group.
Aggregation is performed according to sufficient statistics for the specified
distribution of the columns to be aggregated.
Usage
aggregate_grouped_df(
data,
by,
gaussian = NULL,
gaussian.precision.scales = NULL,
binomial = NULL
)
Arguments
data |
Data frame to be grouped and aggregated. |
by |
Columns in |
gaussian |
Gaussian columns in |
gaussian.precision.scales |
Scales for the precision of Gaussian observations. |
binomial |
Binomial columns in |
Value
Aggregated data frame (tibble), with one row per group, containing
grouping variables, count n
per group, and aggregated list-columns for
specified variables as returned by aggregate_df
.