The goal of trendfilter is to solve nonparametric regression.
You can install the development version of trendfilter from GitHub with:
# install.packages("remotes")
remotes::install_github("glmgen/trendfilter")
This is a basic example which shows you how to solve a common problem:
library(trendfilter)
library(ggplot2)
x <- 1:100 / 101 * 2 * pi
y <- sin(x) + .2 * rnorm(100)
out <- trendfilter(y, x, nlambda = 15)
plot(out) +
geom_point(data = data.frame(x = x, y = y), aes(x, y), color = "black")