View source: R/tm_variable_browser.R
create_sparklines | R Documentation |
sparkline
widget HTMLGenerates the sparkline
HTML code corresponding to the input array.
For numeric variables creates a box plot, for character and factors - bar plot.
Produces an empty string for variables of other types.
create_sparklines(arr, width = 150, ...)
## S3 method for class 'logical'
create_sparklines(arr, ...)
## S3 method for class 'numeric'
create_sparklines(arr, width = 150, ...)
## S3 method for class 'character'
create_sparklines(arr, ...)
## S3 method for class 'factor'
create_sparklines(arr, width = 150, bar_spacing = 5, bar_width = 20, ...)
## S3 method for class 'Date'
create_sparklines(arr, width = 150, bar_spacing = 5, bar_width = 20, ...)
## S3 method for class 'POSIXct'
create_sparklines(arr, width = 150, bar_spacing = 5, bar_width = 20, ...)
## S3 method for class 'POSIXlt'
create_sparklines(arr, width = 150, bar_spacing = 5, bar_width = 20, ...)
## Default S3 method:
create_sparklines(arr, width = 150, ...)
arr |
vector of any type and length |
width |
|
... |
|
bar_spacing |
|
bar_width |
|
Character string containing HTML code of the sparkline
HTML widget.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.