Learn R Programming

FlowScreen (version 2.0)

pks.dur: Calculate the inter-event duration

Description

This function calculates duration (in days) between flow peaks.

Usage

pks.dur(Peaks)

Value

Returns a numeric vector containing the duration (in days) between peaks over threshold from pks. The "times" attribute contains the calendar year date of the earlier peak. The "names" attribute contains the hydrologic year and the day (1-366) of the hydrologic year.

Arguments

Peaks

Output from pks.

Author

Jennifer Dierauer

Examples

Run this code
data(caniapiscau)
cania.ts <- create.ts(caniapiscau, hyrstart = 4)
cania.ts <- drop.years(cania.ts)
cania.ts <- set.plot.titles(cania.ts, 
title.elements = c("StationID", "StnName", "StateProv"))

res1 <- pks(cania.ts)
res2 <- pks.dur(res1)
res3 <- screen.metric(res2, ylabel = "Inter-Event Duration (days)")

Run the code above in your browser using DataLab