[R] Finding local minima and maxima

From: Sean Davis <sdavis2_at_mail.nih.gov>
Date: Wed 15 Jun 2005 - 21:57:35 EST


I have data in the form of (x,y) pairs and would like to find local minima and maxima (typically the zeros of the 2nd derivative) of the y values. I looked at numericDeriv, but I don't have an "expression" per se. I looked at optim, also, but it looks like it will find only one "global" max or min. I can code up my own piecewise derivatives, but wondered if there is an existing function to do this.

Thanks,
Sean



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jun 15 22:01:49 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:40 EST