Learn R Programming

hydrostats (version 0.2.9)

ann.cv: Calculate interannual coefficient of variation

Description

This function takes a daily time series and returns the coefficient of variation of mean annual flow expressed as a percentage.

i.e. (sd/mean)*100

Missing values are ignored.

Usage

ann.cv(flow.ts)

Arguments

flow.ts

Dataframe with date and discharge data in columns named "Date" and "Q" respectively. Date must be in POSIX format (see ts.format). Missing values are ignored.

Value

A dataframe with one column (ann.cv).

Examples

Run this code
# NOT RUN {
data(Cooper)
cooper<-ts.format(Cooper)
ann.cv(Cooper)

# }

Run the code above in your browser using DataLab