limbs | R Documentation |
Identify the rising and falling limbs within each event (and optionally plot)
limbs( data, dates = NULL, events, to.plot = TRUE, ymin = min(data), ymax = max(data), xlab = "", ylab = "", main = "" )
data |
The data vector (e.g. a streamflow time series) |
dates |
Date variable, default to NULL (inputting data as a simple vector) |
events |
Event extracted |
to.plot |
c(TRUE,FALSE) whether a plot is produced for the limbs |
ymin |
Minimum plot extend in vertical direction |
ymax |
Maximum plot extent in vertical direction |
xlab |
x-axis label |
ylab |
y-axis label |
main |
Plot title |
Returns indices of start and end of events and the rising/falling limbs within each event
# Example 1 library(hydroEvents) qdata = WQ_Q$qdata[[1]] BF_res = eventBaseflow(qdata$Q_cumecs) limbs(data = qdata$Q_cumecs, dates = NULL, events = BF_res, main = "with 'eventBaseflow'") BFI_res = eventBaseflow(dataBassRiver) # Example 2 library(hydroEvents) BFI_res = eventBaseflow(dataBassRiver) d = as.Date("1974-06-30") + 0:(length(dataBassRiver)-1) limbs(data = dataBassRiver, dates = NULL, events = BFI_res) limbs(data = dataBassRiver, dates = d, events = BFI_res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.