NA and Inf values in the yy will be ignored automatically.
movmean(y, halfwin = 1L, SG_style = FALSE, w = NULL)
y | A numeric vector. |
---|---|
halfwin | Integer, half of moving window size |
SG_style | If true, head and tail values will be in the style of SG (more weights on the center point), else traditional moving mean style. |
w | Corresponding weights of yy, same long as yy. |
x <- 1:100 x[50] <- NA; x[80] <- Inf s1 <- movmean(x, 2, SG_style = TRUE)#> Error in movmean(x, 2, SG_style = TRUE): object '_phenofit_movmean' not founds2 <- movmean(x, 2, SG_style = FALSE)#> Error in movmean(x, 2, SG_style = FALSE): object '_phenofit_movmean' not found