This function calculates Hysteresis Index proposed by Lawler et al. (2006)

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

Arguments

dataframe

data.frame object, containing water discharge (`q`) and suspended sediment concentration (`ssc`) columns

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

Lawler DM, Petts GE, Foster IDL, Harper S. 2006. Turbidity dynamics during spring storm events in an urban headwater river system: The Upper Tame, West Midlands, UK. Science of The Total Environment 360 (1): 109–126 DOI: 10.1016/j.scitotenv.2005.08.032

Examples

library(dplyr)
data(djan)
output_table <- hydro_events(dataframe = djan,
                             q = discharge,
                             datetime = time,
                             window = 21)

output_table %>%
  filter(he == 3) %>%
  HImid(q = discharge, ssc = SS)
#> Warning: NAs dropped
#> [1] 0.3659382