calculate_durations: Calculate durations

Description Usage Arguments Value

View source: R/calculate_durations.R

Description

Given a data frame with a "lake", "date", and "level" columns as well as a vector of desired exceedance probabilities, calculates consecutive months at/above (for probabilities <= 50%) or at/below (for probabilities > 50%) the exceedance levels.

Usage

1
calculate_durations(df, probs = c(10, 25, 50, 75, 90), departures = FALSE)

Arguments

df

a data frame with a "lake" and a "level" column

probs

a vector with all exceedance probabilities to calculate. Defaults to c(10, 25, 75, 90).

departures

logical defaults to FALSE. If TRUE, calculates durations 1ft above median and 1ft below median

Value

durations, a data frame with the following columns:

lake

name of lake

variable

exceedance probability, e.g., "10", "25", "75", or "90"

value

one count of number of months levels were consecutively above or below the given exceedance probability


WDNR-Water-Use/CSLSlevels documentation built on Nov. 21, 2020, 9:13 a.m.