monthly2annual: Calculate annual data from monthly data

Description Usage Arguments Value Author(s) Examples

Description

Transform a monthly time series into an annual one. The user can give a threshold of missing values authorized per year for the aggregation and choose the day to start the year (hydrological year or not)

Usage

1
2
monthly2annual(monthlyData, startYear = "01-01", FUN = mean,
  na.rm = TRUE, threshold = 0.1)

Arguments

monthlyData

[zoo] zoo object with the monthly time series. The date format must be "%Y-%m-%d"

startYear

[character] indicate the month to start the hydrological year. The format must be "MM-01" (by default, calendar year: "01")

FUN

[function] function that have to be applied for the annual aggregation (by default: mean)

na.rm

[boolean] boolean vector (by default, TRUE)

threshold

[numeric] threshold of missing values authorized to compute the annual aggregation. Values must be between 0 and 1 (by default, 10%: 0.1)

...

further arguments

Value

annualData [zoo] zoo object with the annual computed time series. The date is in the format "%Y-MM-01", corresponding of the start month of the year

Author(s)

Florine Garcia (florine.garcia@gmail.com)

Pierre L'Hermite (pierrelhermite@yahoo.fr)

Examples

1
2
monthly2annual(monthlyprec, FUN = sum, startYear = "08-01", threshold = 0.1,
na.rm =TRUE)

flogrc/piflow documentation built on May 24, 2019, 7:34 a.m.