limbs {hydroEvents}R Documentation

Extract rising/falling limbs

Description

Identify the rising and falling limbs within each event (and optionally plot)

Usage

limbs(
  data,
  dates = NULL,
  events,
  to.plot = TRUE,
  ymin = min(data),
  ymax = max(data),
  xlab = "",
  ylab = "",
  main = ""
)

Arguments

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

Value

Returns indices of start and end of events and the rising/falling limbs within each event

Examples

# 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)

[Package hydroEvents version 0.11 Index]