which.peaks | R Documentation |
Find local maxima and local minima
which.peaks(x, partial = FALSE, decreasing = FALSE)
x |
numerical vector contains local maxima (minima) |
partial |
logical value indicating if the two endpoints will be considered |
decreasing |
logical value indicating whether to find local minima |
a vector of locations of local maxima or minima
a = 100:1
which.peaks(a*sin(a/3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.