Find the localMaxima in a series

localMaxima(x)

Arguments

x

Numeric

Value

A numeric vector with the positions of localMaxima

Details

This function comes from user Tommy 's answer on SO: https://stackoverflow.com/questions/6836409/finding-local-maxima-and-minima