| aggregate | R Documentation |
Compute grouped summaries for one or more value columns. When data is a
single file path, the file is scanned once and only the grouping and value
fields are extracted, without materialising the other columns.
aggregate(data, by, value = NULL, fun, ..., na.rm = FALSE, sort = TRUE)
data |
A data frame, or a single path to a delimited text file for the fused one-pass file mode. |
by |
Character vector of grouping columns. |
value |
Optional character vector of value columns to summarize. |
fun |
Summary function applied to each value column. In file mode this is
one or more of |
... |
Additional arguments passed to |
na.rm |
Whether to remove missing values before summarizing (defaults to
|
sort |
Whether to sort output rows by group. |
A basetable containing one row per group.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.