aggregate.station | R Documentation |
The aggregation functions are based on the S3 method for zoo
objects,
but takes care of extra house keeping, such as attributes with meta data.
## S3 method for class 'station'
aggregate(
x,
by,
FUN = "mean",
...,
na.rm = TRUE,
regular = NULL,
frequency = NULL,
verbose = FALSE,
threshold = 1
)
x |
A |
by |
see |
FUN |
a function; see |
... |
additional arguments |
na.rm |
TRUE: ignore NA - see see |
regular |
see |
frequency |
see |
verbose |
if TRUE print progress |
threshold |
threshold used if FUN is 'count', 'freq', 'wetfreq', or 'wetmean' |
aggregate
calculates a time aggregate of an input object,
e.g, the mean seasonal cycle (if by
=month and FUN
="mean") or the
annual sum (if by
=year and FUN
="sum").
aggregate.area
is used for aggregating spatial statistics, such as
the global mean or the global area of some phenomenon.
aggregate.size
is similar to aggregate.area
, but returns the size statistics (square
meters) for individual events (defined as gridboxes touching each other).
The call returns a station object
R.E. Benestad
aggregate.area aggregate.size
## S3 method for class 'station'
data(Svalbard)
x <- aggregate(Svalbard, month, FUN='mean', na.rm=TRUE)
plot(x)
## S3 method for class 'field'
slp <- slp.DNMI()
y <- aggregate(slp, year, FUN='mean', na.rm=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.