View source: R/aggregate.area.R
aggregate.area | 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 'area'
aggregate(
x,
...,
is = NULL,
it = NULL,
FUN = "sum",
na.rm = TRUE,
smallx = FALSE,
verbose = FALSE,
a = 6378,
threshold = NULL
)
x |
A |
... |
additional arguments |
is |
A list or data.frame providing space index, see |
it |
A list or data.frame providing time index, see |
FUN |
A function, e.g., 'sum' or 'mean' |
na.rm |
a boolean; if TRUE ignore NA, see |
smallx |
a boolean defaulting to FALSE |
verbose |
a boolean; if TRUE print information about progress |
a |
radius of earth (unit: km) |
threshold |
threshold to be used if FUN is 'area','exceedance', or 'lessthan' |
aggregate.area
is used for aggregating spatial statistics, such as
the global mean or the global area of some phenomenon.
The function aggregateArea
is exactly the same as aggregate.area
.
The call returns a station object
R.E. Benestad
aggregate 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)
## Aggregate area
w <- aggregate.area(y)
plot(w)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.