Hi

#---------------------------------------------------------------------------------
# funkce pro automaticke oznaceni piku ve spektru (peaks)
# autor Brian Ripley

# span has to be odd number

peaks<-function(series,span=3)
{
z <- embed(series, span)
s <- span%/%2
v<- max.col(z) == 1 + s
result <- c(rep(FALSE,s),v)
result <- result[1:(length(result)-s)]
result
}

HTH 
Petr Pikal

On 14 Jan 2004 at 8:25, Mirka Zednikova wrote:

> If there something available in R that has the
> functionality of the S-PLUS peaks() function?
> 
> Thanks,
> 
> Mirka
> 
> ______________________________________________
> [EMAIL PROTECTED] mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

Petr Pikal
[EMAIL PROTECTED]

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to