rcpp_wSG: Weighted Savitzky-Golay written in RcppArmadillo

View source: R/RcppExports.R

rcpp_wSGR Documentation

Weighted Savitzky-Golay written in RcppArmadillo

Description

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

Usage

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

rcpp_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 <- 1:15
w <- seq_along(y)/length(y)

frame = 5
d = 2
s1 <- rcpp_wSG(y, frame, d, w)
s2 <- rcpp_SG(y, frame, d)

phenofit documentation built on May 29, 2024, 2:39 a.m.