Skip to content

Instantly share code, notes, and snippets.

View krose's full-sized avatar

Kenneth Rose krose

  • Copenhagen, Denmark
View GitHub Profile
@krose
krose / chartlines.R
Created October 16, 2018 13:49
html table with sparklines using the formattable and sparkline packages
library(sparkline)
library(formattable)
data.frame(a = c("A", "B"),
b = c(1, 2),
c = c(sparkline::spk_chr(rnorm(10)), sparkline::spk_chr(rnorm(10), width = 100)),
stringsAsFactors = FALSE) %>%
formattable::formattable() %>%
formattable::as.htmlwidget() %>%
sparkline::spk_add_deps()