R/threeMedianSmooth.R

threeMedianSmooth <- function(x) {
  tmp <- rowMedians(embed(x,3))
  return(c(mean(c(x[1],x[2])),tmp,mean(c(x[length(x)-1],x[length(x)]))))
}
  
seandavi/Rpressa documentation built on May 29, 2019, 4:33 p.m.