igroupAlls(x, group=NULL, na.rm=F, weights=NULL, ngroups=<<see below>>) igroupAnys(x, group=NULL, na.rm=F, weights=NULL, ngroups=<<see below>>) igroupMaxs(x, group=NULL, na.rm=F, weights=NULL, ngroups=<<see below>>) igroupMeans(x, group=NULL, na.rm=F, weights=NULL, ngroups=<<see below>>) igroupMins(x, group=NULL, na.rm=F, weights=NULL, ngroups=<<see below>>) igroupProds(x, group=NULL, na.rm=F, weights=NULL, ngroups=<<see below>>) igroupRanges(x, group=NULL, na.rm=F, weights=NULL, ngroups=<<see below>>) igroupSums(x, group=NULL, na.rm=F, weights=NULL, ngroups=<<see below>>)
x
and values in the range
1:ngroups
where
ngroups<=length(x)
.
The default value is NULL, meaning that the entire vector
x
is one group.
FALSE
.
x
containing weights to use in the summary calculations.
1:ngroups
.
The default value is
max(groups)
or
1
if
groups
is missing
or NULL.
ngroups
for all summaries except
the Range summary, a matrix having 2 rows and
ngroups
columns. The ith element (or column for Range)
contains the summary value for
x[group == i]
.
This collection of functions,
igroupXXXs
, calculates
summary statistics for groups of data in the input vector,
x
.
The summary functions perform these computations:
    All - all of the elements in a group are TRUE.
    Any - any of the elements in a group are TRUE.
    Max - maximum of all the elements in a group.
    Min - minimum of all the elements in a group.
    Range - minimum and maximum of all elements in a group.
    Mean - mean value of all the elements in a group.
    Sum - sum of all elements in a group.
    Prod - product of all elements in a group.
NA's and out-of-range elements in
groups
cause the
corresponding element in
x
to not be included
in the summary calculations.
# compute ranges for Plant groups in CO2 update values igroupRanges(CO2$uptake, group=CO2$Plant)