cm_aggregate.Rd
Dataset containing sampling depth (upper+lower) and numeric values can be aggregated to equal depth increments.
Depths and res_out
should be stated in meters.
cm_aggregate(
dataset,
depth_top_col,
depth_bottom_col,
aggregate_list,
group_list = "o3",
res_out = 0.1,
add_funs = NULL
)
An R tibble or data.frame
Upper sampling depth column name
Lower sampling depth column name
Columns to be aggregated. Can be character vector or string. Selected column must be numeric
Optional grouping variables (e.g., sites, sampling points, soil cores etc.). Default set to o3 corresponding to output upper depth (no additional grouping).
Aggregate depth increments that are to be returned. Should be same unit as depth_bottom_col and depth_top_col.
List of additional function arguments like sd or n that can be passed to summarise. This will change output for aggregate vars to ..._mean, ..._sd, etc.