Description Usage Arguments Value
View source: R/calculate_durations.R
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.
1 | calculate_durations(df, probs = c(10, 25, 50, 75, 90), departures = FALSE)
|
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 |
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 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.