R/Spline.R

Defines functions SPLINE

SPLINE <- function(rw, bandwidth = 32, p = 0.5) {
  p <- as.numeric(p)
  series <- rw[!is.na(rw)]
  curve <- suppressWarnings(ffcsaps(series, nyrs = bandwidth, f = p))
  rw[!is.na(rw)] <- curve
  return(rw)
}

Try the detrendeR package in your browser

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

detrendeR documentation built on April 16, 2022, 1:06 a.m.