Learn R Programming

hydropeak (version 0.1.2)

event_type: Event Type

Description

Given a data frame (time series) of equal flow (Q) trend, it is determined whether the flow is increasing or decreasing, constant or if missing values occur. It returns a numeric value which indicates the event type. As the event type is already determined when the change points are computed, this function is mainly used for demonstration purpose or if metrics should be computed individually.

Usage

event_type(x)

Value

Returns an numeric value which indicates the event type. Event types are defined as follows:

  • 0: Constant event after NA event or constant event as first event in time series

  • 1: Constant event after DC

  • 2: Increasing event (IC)

  • 3: Constant event after IC

  • 4: Decreasing event (DC)

  • 5: NA event

Arguments

x

Data frame (time series) from an event with equal flow trend. Data frame must contain a date-time column (Time) and a flow rate column (Q) and must be in a compatible format. (see flow()).

Examples

Run this code
data(Q)
# decreasing event
Q4 <- flow(Q[3:4, ])
event_type(Q4)

# increasing event
Q2 <- flow(Q[486:487, ])
event_type(Q2)

Run the code above in your browser using DataLab