valueType
parameter can be passed to the
branchvalues
of the plot_ly
treemap/sunburst visualizations.If this parameter is set to 'total' and the sum of the counts of the the children nodes is not bigger than the parent node, an empty plot is created. In this case, this function set this parameter to: 'relative'.
checkValueType(data, vars, valueVar, valueType = "total", labelVars = NULL)
If the condition is fullfilled:
updated valueType
and warning;
otherwise input valueType
.
Data.frame with data.
Character vector with variables of data
containing the groups. If multiple, they should be specified in
hierarchical order (from parent to child node).
String with numeric variable of data
containing the value to display.
String with type of values in valueVar
(branchvalues
of the plot_ly
) function),
among others: 'total' (default, only if sum(child) <= to parent)
or 'relative'.
Named character vector containing variable labels.
Laure Cougnaud