internal_aggregate {dRiftDM} | R Documentation |
Aggregate Data Frame Columns by Group
Description
internal function to aggregate columns of a data frame across "ID" while considering a set of grouping columns. It retains the class and attriubtes of the input data.
Usage
internal_aggregate(data, group_cols)
Arguments
data |
A data.frame containing the data to be aggregated. It should include both the grouping columns, an "ID" column, and the columns for which aggregation shall take place. |
group_cols |
A character vector specifying the names of the columns to group by during aggregation. |
Details
internal_aggregate
identifies DV columns as those not in group_cols
or
"ID"
. It then calculates the mean of these DV columns, grouped by the
specified columns.
Value
A data.frame
containing the aggregated data.
See Also
aggregate_stats()
, calc_stats()
,
new_stats_dm()
[Package dRiftDM version 0.2.1 Index]