Learn R Programming

hydropeak (version 0.1.2)

amp: 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)

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.

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()).

Examples

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

Run the code above in your browser using DataLab