annual: Conversion to esd objects.

View source: R/as.annual.R

annualR Documentation

Conversion to esd objects.

Description

as.annual and annual aggregates time series into annual values (e.g. means).

Usage

annual(x, ...)

Arguments

x

an input object of, e.g., class 'station', 'field'

...

additional argument

FUN

a function, see aggregate.zoo

nmin

Minimum number of data points (e.g. days or months) with valid data accepted for annual estimate. NULL demands complete years.

start

makes it possible to estimate annual aggregated statistics that start into the year. E.g. start='Sep' starts the year on September 1st. Other allowed formats are start='MM-DD'.

format

'numeric' or 'character'

na.rm

a boolean; if TRUE, ignore NA - see see mean

verbose

a boolean; if TRUE print information about progress

Details

as.monthly aggregates time series into monthly values (e.g. means).

as.daily aggregates time series into daily values (e.g. means).

as.4seasons aggregates to four seasons ('djf': December-February, 'mam': March-May, 'jja': June-August, 'son': September-November)

as.seasons aggregates to a user defined season with input arguments 'start' and 'end' giving the dates. To select march to september, use either start='03-01' and end='09-30' or start = 3 and end = 9.

as.OctMar aggregates to the season October to March, which is the rainy season in parts of Africa.

Value

Same class as x

See Also

aggregate

Examples

data(ferder)
plot(annual(ferder,FUN="min"))
plot(annual(ferder,FUN="IQR",na.rm=TRUE))
plot(annual(ferder))
lines(annual(ferder,start='Jul'))

data(bjornholt)
plot(as.4seasons(bjornholt,threshold=1,FUN="exceedance"))


metno/esd documentation built on April 24, 2024, 9:19 p.m.