Description Usage Arguments Value Examples
aggregate
aggregates data based on the specified aggregation method.
1 2 3 4 5 6 7 8 |
population |
tbl with grouping (metadata) and observation variables. |
variables |
character vector specifying observation variables. |
strata |
character vector specifying grouping variables for aggregation. |
operation |
optional character string specifying method for aggregation,
e.g. |
univariate |
boolean specifying whether the aggregation function is univariate or multivariate. |
... |
optional arguments passed to aggregation operation |
aggregated data of the same class as population
.
1 2 3 4 5 6 7 8 9 10 11 12 | population <- tibble::tibble(
Metadata_group = c(
"control", "control", "control", "control",
"experiment", "experiment", "experiment",
"experiment"
),
Metadata_batch = c("a", "a", "b", "b", "a", "a", "b", "b"),
AreaShape_Area = c(10, 12, 15, 16, 8, 8, 7, 7)
)
variables <- c("AreaShape_Area")
strata <- c("Metadata_group", "Metadata_batch")
aggregate(population, variables, strata, operation = "mean")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.