powered by
The function returns maxima (values which have only smaller neighbours) and minima (values which have only larger neighbours).
peaks(x, y=NULL, mode="maxmin")
the coordinates of given points.
specifies if both maxima and minima (mode="maxmin") or only maxima (mode="max") or minima (mode="min") are requested.
mode="maxmin"
mode="max"
mode="min"
A list with x and y coordinates of all peaks.
approx, upca
approx
upca
# NOT RUN { x <- sin(seq(0, 10, 0.1)) plot(x) points(peaks(x), col="red", pch=15) # }
Run the code above in your browser using DataLab