find_events | R Documentation |
This function accepts a vector of flow values, tests if each value in the flow vector is above or below a defined threshold, and classifies the flow vector into events. An event is defined as consecutive values above or below the given threshold.
find_events(x, threshold, type = "high")
x |
A numeric vector of flow values |
threshold |
Numeric threshold value defining event |
type |
character indicating type of event. High flags events above threshold, low flags events below threshold. |
A dataframe with columns "flow" and "event"
x <- sampleData$discharge
threshold <- median(x,na.rm=TRUE)
find_events(x,threshold)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.