find local maximums

local_max_cmps(x, find_max = 0)

Arguments

x

numeric vector, the input sequence

find_max

a numeric scalor, the function finds maximums if find_max = 0 finds minimums if overwise.