peaks | R Documentation |
The function returns maxima (values which have only smaller neighbours) and minima (values which have only larger neighbours).
peaks(x, y=NULL, mode="maxmin")
x , y |
the coordinates of given points. |
mode |
specifies if both maxima and minima ( |
A list with x and y coordinates of all peaks.
approx
,
upca
x <- sin(seq(0, 10, 0.1))
plot(x)
points(peaks(x), col="red", pch=15)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.