powered by
Find local maxima and local minima of data sequence
which.peaks(x, partial = FALSE, decreasing = FALSE)
a vector of locations of local maxima or minima
numerical vector contains local maxima (minima)
logical value indicating if the two endpoints will be considered
logical value indicating whether to find local minima
a = 100:1 which.peaks(a*sin(a/3))
Run the code above in your browser using DataLab