tlumley at u.washington.edu
Tue May 28 19:03:59 CEST 2002
On Tue, 28 May 2002, Herve Cardot wrote:
> I am looking for a function in R that is equivalent to the function
> "peaks" in
> Splus. This function gives the local maxima of a vector.
> I do not find it using the help and I 'm not sure it exits in R.
It should be something like
This version doesn't allow the first or last observation to be a peak
(and if na.rm=FALSE one before or after a NA can't be a peak either),
which is a matter of definition -- I've never used the S-PLUS function so
I don't know what it does. Use max=FALSE to get `valleys'.
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help