knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
This is an R package wrapper around the C solver for the l1 trend filtering algorithm written by Kwangmoo Koh, Seung-Jean Kim and Stephen Boyd.
You can install the development version of l1tf from GitHub with:
# install.packages("devtools") devtools::install_github("hadley/l1tf")
library(l1tf) plot(sp500$log, type='l', col='blue') lines(l1tf(sp500$log, lambda = 50), col = "red", type='l') lines(l1tf(sp500$log, prop = 0.01), col = "green3", type='l')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.