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.
aggregate_grouped_df(
data,
by,
gaussian = NULL,
gaussian.precision.scales = NULL,
binomial = NULL
)
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
.
Data frame to be grouped and aggregated.
Columns in data
for which to group data by.
Gaussian columns in grouped_data
to be aggregated.
Defaults to NULL
(optional).
Scales for the precision of Gaussian observations.
See aggregate_df
documentation for format details, and agaussian
in INLA
for more details.
Defaults to NULL.
Binomial columns in grouped_data
to be aggregated.
Defaults to NULL
(optional).