datatable
as a barplot.Format a variable in a datatable
as a barplot.
formatDTBarVar(
tableDT,
data,
barVar = NULL,
barColorThr = NULL,
barRange = NULL,
getCol = function(x) x
)
Updated tableDT
datatable
object
Data.frame with content of tableDT
.
Character vector with numeric variable of data
which should be represented as bar in the table.
Numeric vector with threshold to consider to color the bar, either:
a numeric vector of length 1, same threshold for all bars
named vector with threshold for each bar, named with the variable
in barVar
(optional) range for the bars, either:
a numeric vector of length 2, same range for all bars
list with range for each bar, named with the variable
in barVar
If not specified, the range of each barVar
variable
in data
is used.
Function, which for an index of a column
in data
returns the index of the column to be passed to
formatStyle
Laure Cougnaud