R/smooth_wWHIT.R
whit2.Rd
This function smoothes signals with a finite difference penalty of order 2.
This function is modified from ptw
package.
whit2(y, lambda, w = rep(1, ny))
y | signal to be smoothed: a vector |
---|---|
lambda | smoothing parameter: larger values lead to more smoothing |
w | weights: a vector of same length as y. Default weights are equal to one |
A numeric vector, smoothed signal.
Eilers, P.H.C. (2004) "Parametric Time Warping", Analytical Chemistry,
76 (2), 404 -- 411.
Eilers, P.H.C. (2003) "A perfect smoother", Analytical Chemistry, 75, 3631 -- 3636.
Paul Eilers, Jan Gerretzen
#> Error in library(phenofit): there is no package called ‘phenofit’#> Warning: data set ‘MOD13A1’ not found#> Error in tidy_MOD13(MOD13A1$dt): object 'MOD13A1' not foundy <- dt[site == "AT-Neu", ][1:120, y]#> Error in eval(expr, envir, enclos): object 'site' not found#> Error in plot(y, type = "b"): object 'y' not found#> Error in whit2(y, lambda = 2): object 'y' not found#> Error in whit2(y, lambda = 10): object 'y' not found#> Error in whit2(y, lambda = 100): object 'y' not found#> Error in strwidth(legend, units = "user", cex = cex, font = text.font): plot.new has not been called yet