powered by
Get the indices of the local maxima in a list of numbers
local_maxima(x)
A vector containing the indices of the elements that are local maxima in the given input.
Vector of numbers.
local_maxima(c(1, 5, 3, 2, 4, 3))
Run the code above in your browser using DataLab