aggregate: aggregate

Description Usage Arguments Value Author(s) See Also Examples

Description

The aggregation is based on the S3 method for zoo objects, but takes care of extra house keeping, such as attributes with meta data.

Usage

1
2
3
4
5
aggregate.station(x,by,FUN = 'mean', ..., regular = NULL, frequency = NULL) 
aggregate.field(x,by,FUN = 'mean', ..., regular = NULL, frequency = NULL)
aggregate.comb(x,by,FUN = 'mean', ...,
               regular = NULL, frequency = NULL)
aggregate.area(x,is=NULL,it=NULL,FUN='sum',na.rm=TRUE,smallx=FALSE)

Arguments

x

A station, spell or a field object

by

see aggregate.zoo

FUN

see aggregate.zoo

regular

see aggregate.zoo

frequency

see aggregate.zoo

is

spatial selection - see subset.field

na.rm

TRUE: ignore NA - see see mean

Value

The call returns a station object

Author(s)

R.E. Benestad

See Also

spatial.avg.field as.4seasons, annual

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Example: use aggregate to compute annual mean temperature for Svalbard:
data(Svalbard)
yr <- year(Svalbard)
y <- aggregate(Svalbard, by=yr, mean, na.rm = FALSE) 
plot(y)

# Example for getting seasonal aggregate of standard deviation of
oslo <- station("Oslo Blindern",stid="193",src="ECAD")
ym <- as.4seasons(oslo,FUN=mean)
ys <- as.4seasons(oslo,FUN=sd)
y <- combine(ym,ys)
plot(y)

x <- t2m.NCEP()
z <- aggregate.area(x)
plot(z)

metno/esd.test documentation built on May 22, 2019, 7:49 p.m.