smooth_wSG: Weighted Savitzky-Golay

View source: R/RcppExports.R

smooth_wSGR Documentation

Weighted Savitzky-Golay

Description

NA and Inf values in the y has been ignored automatically.

Usage

smooth_wSG(y, halfwin = 1L, d = 1L, w = NULL)

smooth_SG(y, halfwin = 1L, d = 1L)

Arguments

y

colvec

halfwin

halfwin of Savitzky-Golay

d

polynomial of degree. When d = 1, it becomes moving average.

w

colvec of weight

Examples

y <- c(1, 3, 2, 5, 6, 8, 10, 1)
w <- seq_along(y)/length(y)

halfwin = 2
d = 2
s1 <- smooth_wSG(y, halfwin, d, w)
s2 <- smooth_SG(y, halfwin, d)

rtrend documentation built on June 22, 2024, 11:39 a.m.