A purposedly simple implementation of sparkbars that can plot negative and positive values.
sparkbars is not con CRAN yet, but you can install the developement version from GitHub with:
remotes::install_github("eliocamp/sparkbars")
library(sparkbars)
set.seed(1)
x <- rnorm(10)
sparkbars(x, color = TRUE)
#> 1.6 ┌ ▂ ▇▂ ▃▄▃
#> -0.84 └ ▆ ▅ ▅ ▇
Doesn’t work with knitr.
Inline:
[7m▆[27m, ▂, [7m▅[27m, ▇, ▂, [7m▅[27m, ▃, ▄, ▃, [7m▇[27m
Looks horrible
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.