R/peaks.R

"peaks" <-
function(x,span=3) { 
          z <- embed(x, span) 
	  s <- span %/% 2
          result <- max.col(z) == 1 + s 
          c(rep(FALSE,s), result, rep(FALSE,s)) 
          }

Try the PROcess package in your browser

Any scripts or data that you put into this service are public.

PROcess documentation built on Nov. 8, 2020, 5:44 p.m.