Skip to contents

Apply the whittaker 1st order smoother to a matrix.

Usage

wt1(x, lambda = 50)

Arguments

x

matrix. The data to smooth by row.

lambda

numeric. The smoother parameter.

Value

A matrix with the same dimensions as x.

Examples

if (FALSE) {
set.seed(12029)
n <- 20
x <- matrix(1:n + rnorm(n), nrow = 1, ncol = n)
x[ , 5] <- NA
y <- wt1(x, lambda = 2)
plot(x[1, ])
lines(y[1, ], col = "blue")
}