R/mmeansd.R

Defines functions sliding.meansd

Documented in sliding.meansd

sliding.meansd <- function(positions, scores, half.width) {
  stopifnot(!is.unsorted(positions), length(positions) == length(scores), half.width >= 0)
  res <- .Call(ringoMovingMeanSd, as.integer(positions), as.numeric(scores), as.integer(half.width))
  colnames(res) <- c("mean","sd","count")
  rownames(res) <- positions
  return(res)
}#sliding.meansd

Try the Ringo package in your browser

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

Ringo documentation built on Nov. 8, 2020, 5:34 p.m.