powered by
NA and Inf values in the y has been ignored automatically.
smooth_wSG(y, halfwin = 1L, d = 1L, w = NULL)smooth_SG(y, halfwin = 1L, d = 1L)
smooth_SG(y, halfwin = 1L, d = 1L)
colvec
halfwin of Savitzky-Golay
polynomial of degree. When d = 1, it becomes moving average.
colvec of weight
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)
Run the code above in your browser using DataLab