Description Usage Arguments Value Examples
Helper function to easily create a daily, weekly, monthly or seasonal varying threshold.
1 2 | vary_threshold(x, varying = "constant",
fun = function(x) quantile(x, probs = 0.05, na.rm = TRUE), ...)
|
x |
an object which can be coerced to class xts. Either with a single column or with a column named 'discharge'. |
varying |
if |
fun |
a function accepting a single argument and returning either a vector of length one or a vector as long as |
... |
additional arguments, passed on to |
a vector as long as x
.
1 2 3 4 5 6 7 8 9 10 |
Loading required package: xts
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
Loading required package: lmom
Loading required package: lattice
Warning message:
1.3% of the discharges (14 observations) are NA values. NAs always terminate a drought event.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.