R/big.peaks.col.R

big.peaks.col <-
function(x, tre){
  r <- rle(x)
  v <- which(rep(x = diff(sign(diff(c(-Inf, r$values, -Inf)))) == -2, times = r$lengths))
  pos <- v[which(x[v] > tre)] #position of the real peaks
  hei <- x[pos]
  out <- list(pos=pos,hei=hei)
  return(out)
}

Try the Fragman package in your browser

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

Fragman documentation built on May 2, 2019, 8:26 a.m.