# NOT RUN {
data(NL_6min_2013)
MHW <- 0.9117 # New London MHW in 2013: 0.9117 m relative to MLLW
# median flooding duration at three elevations
dur.events(NL_6min_2013[, 2], elevation = c(0.5, MHW, 1.5), units = "6 minutes")
# a dataframe is output when results are more complex
dur.events(NL_6min_2013[, 2], elevation = MHW,
percentile = c(0.1, 0.5, 0.9), units = "6 minutes")
dur.events(NL_6min_2013[, 2], elevation = c(0.5, MHW, 1.5),
percentile = c(0.1, 0.5, 0.9), units = "6 minutes")
# dur.events() differs from fld.dur() in that it examines individual
# flooding events, rather than cumulative inundation
# The median flooding event at MHW lasts 2.9 hrs
dur.events(NL_6min_2013[, 2], elevation = MHW, units = "6 minutes")
# And over an entire year, MHW was flooded 13% of the time
fld.dur(z = MHW, NL_6min_2013[, 2])
# }
Run the code above in your browser using DataLab