local_extrema: A function that returns local maxima and minima in a profile

View source: R/local_extrema.R

local_extremaR Documentation

A function that returns local maxima and minima in a profile

Description

A function that returns local maxima and minima in a profile

Usage

local_extrema(sr)

Arguments

sr

tibble with columns l and z describing profile

Value

tibm a tibble of local maxima ("locmax") and minima ("locmin")

Examples

s1 <- tibble(l=c(1.2,5.3,8.1,12.0,13.1,
                 15.5,16.8,17.6,18.1,19.2,
                 21.3,23.1,24.1,25.2,26.5,
                 29.7,38.0,40.0,42.1,44.4),
             z=c(7.2,7.3,8.1,6.8,7.1,
                 1.3,2.0,2.2,1.1,1.8,
                 1.5,2.5,2.8,3.1,2.8,
                 2.1,3.3,5.0,4.6,6.2))
local_extrema(s1)

lvaudor/riverbed documentation built on Feb. 25, 2023, 3:47 p.m.