knitr::opts_chunk$set( collapse = TRUE, tidy = FALSE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
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)
Doesn't work with knitr.
Inline:
r sparkbars(x)
Looks horrible
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.