powered by
Find local maxima and minima in a sequence
which.peaks(x, partial = FALSE, decreasing = FALSE)
a vector with maxima or minima
endpoints will be considered if 'true'
find local minima if 'true', ortherwise local maxima
a vector of positions of local maxima or minima
# NOT RUN { a = 100:1 which.peaks(a*sin(a/3)) # }
Run the code above in your browser using DataLab