Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 896 Bytes

README.md

File metadata and controls

36 lines (24 loc) · 896 Bytes

tvdenoising

R-CMD-check

This package provides an R frontend to a C implementation of linear-time univariate total variation denoising via dynamic programming (Johnson 2013).

Installation

You can install the development version of tvdenoising from GitHub with:

# install.packages("pak")
pak::pak("glmgen/tvdenoising")

Example

library(tvdenoising)
y <- c(rnorm(30), rnorm(40, 2), rnorm(30))
yhat <- tvdenoising(y, 10)
plot(y, pch = 16)
lines(yhat, col = 2)