powered by
peaks(x, y=NULL, mode="maxmin")
mode="maxmin"
mode="max"
mode="min"
approx
upca
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