Learn R Programming

CSHShydRology (version 1.4.2)

ch_rfa_extractamax: Extracts the annual maxima of a daily time series

Description

Extracts the annual maxima of a daily time series

Usage

ch_rfa_extractamax(x, ...)

# S3 method for formula ch_rfa_extractamax(form, x, tol = 0, ...)

# S3 method for default ch_rfa_extractamax(x, tol = 0, nlab = "n", ylab = "yy", ...)

Value

Returns a data frame containing the annual (Monthly) maxima, the date and the number of observations during the year.

Arguments

x

Data. If no formula is passed, the first column must be the value and the second the date.

...

Other parameters.

form

Formula of the form value ~ date that specifies the variable from which the annual maximums are extracted and a date variable.

tol

Filter the years having less than tol days.

nlab, ylab

Names for the added columns representing respectively the number of yearly observations and the year. If set to NULL the given column is not added.

Author

Martin Durocher

Examples

Run this code

out <- ch_rfa_extractamax(flow ~ date, CAN01AD002, tol = 350)
head(out)

Run the code above in your browser using DataLab