Description Usage Arguments Value Examples
Find local maxima and minima in a sequence
1 | which.peaks(x, partial = FALSE, decreasing = FALSE)
|
x |
a vector with maxima or minima |
partial |
endpoints will be considered if 'true' |
decreasing |
find local minima if 'true', ortherwise local maxima |
a vector of positions of local maxima or minima
1 2 | a = 100:1
which.peaks(a*sin(a/3))
|
[1] 2 21 40 58 77 95
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.