This function calculates Hysteresis Index proposed by Aich et al. (2014)

AHI(dataframe, q, ssc, .warn = TRUE)

Arguments

dataframe

data.frame object.

q

numeric, water discharge variable.

ssc

numeric, suspended sediment concentration variable.

.warn

logical, indicating if the warning message should be displayed.

Value

a numeric value either NA

References

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

Examples

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