peakdiff: Calculate the peak difference of two hydrographs

View source: R/peakdiff.r

peakdiffR Documentation

Calculate the peak difference of two hydrographs

Description

Calculate the peak difference of two hydrographs.

Usage

peakdiff(sim, obs, timesteps, width = 12, FUN = me, nop = 5, ...)

Arguments

sim

xts object. The simulated hydrograph.

obs

xts object. The observed hydrograph.

timesteps

numeric. How many timesteps should be considered (equal distributed around the observed peak)?

width

numeric. Number of timesteps on eighter side of the peak that must be smaller than the peak. Corresponds to paramteter m in find_peaks

FUN

function. Objective function to be calculated whitin the region of the peak(s).

nop

integer. Number of peaks being evaluated.

...

additional arguments passed to FUN

Details

FUN should be a function that can operate with sim and obs values and returns one single value.

Peaks are detected in obs only!

Value

a vector with the results of the objective function

Author(s)

Simon Frey

See Also

find_peaks


freysimon/TigR documentation built on April 20, 2024, 9:28 p.m.