powered by
This function is a 'wrapper' for the group_by and summarize procedure used in dplyr to aggregate dataframes.
agg_data(data, col = "atoutput", groups, out = "atoutput", fun)agg_perc(data, col = "atoutput", groups, out = "atoutput")group_data(data, groups)
agg_perc(data, col = "atoutput", groups, out = "atoutput")
group_data(data, groups)
Dataframe the aggregation is applied to.
Column of the dataframe the summarise function is applied. Default is atoutput.
atoutput
Vector of character strings giving the grouping variables.
Character string specifying the name of the output column. Default is atoutput.
Aggregation function to apply.
grouped datarame with the aggregated data.
# NOT RUN { agg_ref_nums <- agg_data(data = ref_nums, groups = c("species", "agecl"), fun = mean) # }
Run the code above in your browser using DataLab