amp: AMP - Amplitude (Metric 1)

View source: R/metrics.R

ampR Documentation

AMP - Amplitude (Metric 1)

Description

The amplitude (AMP, unit: m^3/s) of an event is defined as the difference between the flow maximum (Q_max) and the flow minimum (Q_min). Given an event with equal flow trend, the amplitude is computed and returned.

Usage

amp(x)

Arguments

x

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

Value

Returns a positive numeric value which is the difference of max(x$Q) and min(x$Q) of an event. If a data frame containing NA flow rates (Q) is given, NA is returned.

Examples

data(Q)
Q <- flow(Q[3:4, ])
amp(Q)

hydropeak documentation built on Nov. 16, 2022, 9:06 a.m.