Description Usage Arguments Examples
Create a character version ofinteractive sparklines for use with other 'htmlwidgets' or tags.
1 2 |
values |
|
... |
additional options passed to |
width |
height and width of sparkline htmlwidget
specified in any valid |
height |
height and width of sparkline htmlwidget
specified in any valid |
elementId |
|
renderSelector |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
#spk_chr works well with dplyr summarise
library(dplyr)
library(sparkline)
library(formattable)
mtcars %>%
group_by(cyl) %>%
summarise(
hp = spk_chr(
hp, type="box",
chartRangeMin=0, chartRangeMax=max(mtcars$hp)
),
mpg = spk_chr(
mpg, type="box",
chartRangeMin=0, chartRangeMax=max(mtcars$mpg)
)
) %>%
formattable() %>%
formattable::as.htmlwidget() %>%
spk_add_deps()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.