S3 generic for sparkline
widget HTML
create_sparklines.Rd
Generates 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.
Coerces a character vector to factor and delegates to the create_sparklines.factor
Coerces logical vector to factor and delegates to the create_sparklines.factor
Usage
create_sparklines(arr, width = 150, ...)
# S3 method for default
create_sparklines(arr, width = 150, ...)
# S3 method for Date
create_sparklines(arr, width = 150, bar_spacing = 5, bar_width = 20, ...)
# S3 method for POSIXct
create_sparklines(arr, width = 150, bar_spacing = 5, bar_width = 20, ...)
# S3 method for POSIXlt
create_sparklines(arr, width = 150, bar_spacing = 5, bar_width = 20, ...)
# S3 method for character
create_sparklines(arr, ...)
# S3 method for logical
create_sparklines(arr, ...)
# S3 method for factor
create_sparklines(arr, width = 150, bar_spacing = 5, bar_width = 20, ...)
# S3 method for numeric
create_sparklines(arr, width = 150, ...)
Arguments
- arr
vector of any type and length
- width
numeric
the width of thesparkline
widget (pixels)- ...
list
additional options passed to bar plots ofjquery.sparkline
; seejquery.sparkline docs
- bar_spacing
numeric
spacing between the bars (in pixels)- bar_width
numeric
width of the bars (in pixels)
Value
character variable containing the HTML code of the sparkline
HTML widget
character
with HTML code for the sparkline
widget
character
with HTML code for the sparkline
widget
character
with HTML code for the sparkline
widget
character
with HTML code for the sparkline
widget
character
with HTML code for the sparkline
widget
character
with HTML code for the sparkline
widget
character
with HTML code for the sparkline
widget