This function calculates Hysteresis Index proposed by Aich et al. (2014)
AHI(dataframe, q, ssc, .warn = TRUE)
data.frame object.
numeric, water discharge variable.
numeric, suspended sediment concentration variable.
logical, indicating if the warning message should be displayed.
a numeric value either NA
Aich V, Zimmermann A, Elsenbeer H. 2014. Quantification and interpretation of suspended-sediment discharge hysteresis patterns: How much data do we need? CATENA 122: 120–129 DOI: 10.1016/j.catena.2014.06.020
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
data(djan)
output_table <- hydro_events(dataframe = djan,
q = discharge,
datetime = time,
window = 21)
output_table %>%
filter(he == 2) %>%
AHI(q = discharge, ssc = SS)
#> Warning: NAs dropped
#> [1] 0.08297924