Note: the table and plot are not (yet) linked.
plotCountClinData(
data,
vars,
varsLab = getLabelVar(vars, labelVars = labelVars),
valueVar,
valueLab = getLabelVar(valueVar, labelVars = labelVars),
colorVar = NULL,
colorLab = getLabelVar(valueVar, labelVars = labelVars),
colorPalette = getOption("clinDataReview.colors"),
colorRange = NULL,
valueType = "total",
title = paste(c(paste(valueLab, "by", paste(varsLab, collapse = " and ")), titleExtra),
collapse = "
"),
titleExtra = NULL,
subtitle = NULL,
caption = NULL,
labelVars = NULL,
width = NULL,
height = NULL,
pathVar = NULL,
pathLab = getLabelVar(pathVar, labelVars = labelVars),
hoverVars = c(vars, valueVar, colorVar),
hoverLab = getLabelVar(hoverVars, labelVars = labelVars),
table = FALSE,
tableVars,
tableLab,
tableButton = TRUE,
tablePars = list(),
id = paste0("plotClinData", sample.int(n = 1000, size = 1)),
verbose = FALSE,
typePlot = c("sunburst", "treemap"),
watermark = NULL
)
Either:
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).
Named character vector with labels for vars
.
String with numeric variable of data
containing the value to display.
String with label for the valueVar
variable.
(optional) String with coloring variable (NULL by default). By default, the treemap is colored based by section.
String with label for colorVar
.
(optional) Named character vector with color palette.
If not specified, the viridis color palette is used.
See clinColors
.
(optional) Numeric vector of length 2 with range for the color variable, in case it is a numeric variable.
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'.
String with title for the plot.
String with extra title for the plot (appended after title
).
String with subtitle.
The subtitle is included at the top left of the plot,
below the title.
String with caption.
The caption is included at the bottom right of the plot.
Please note that this might overlap with
vertical or rotated x-axis labels.
Named character vector containing variable labels.
Numeric, width of the plot in pixels, 800 by default.
Numeric, height of the plot in pixels, 500 by default.
String with variable of data
containing hyperlinks
with path to the subject-specific report, formatted as:
<a href="./path-to-report">label</a>
.
If multiple, they should be separated by: ', '.
The report(s) will be:
compressed to a zip file and downloaded if the user clicks on the 'p' (a.k.a 'profile') key when hovering on a point of the plot
included in a collapsible row, and clickable with hyperlinks in the table
String with label for pathVar
,
included in the collapsible row in the table.
Character vector with variable(s) to be displayed in the hover, by default any position (and axis) and aesthetic variables displayed in the plot.
Named character vector with labels for hoverVars
.
Logical, if TRUE (FALSE by default)
returns also a datatable
containing the plot data.
(The plot and the table are not linked.)
Character vector with variables to be included in the table.
Named character vector with labels
for each tableVars
.
Logical, if TRUE (by default) the table is included within an HTML button.
List with parameters passed to the
getClinDT
function.
String with general id for the plot:
'id' is used as group
for the SharedData
'button:[id]' is used as button ID if table
is TRUE
If not specified, a random id, as 'plotClinData[X]' is used.
Logical, if TRUE (FALSE by default) progress messages are printed in the current console. For the visualizations, progress messages during download of subject-specific report are displayed in the browser console.
String with plot type, 'treemap' or 'sunburst'.
(optional) String with path to a file containing a watermark.
Laure Cougnaud
Other visualizations of summary statistics for clinical data:
barplotClinData()
,
boxplotClinData()
,
errorbarClinData()
,
sunburstClinData()
,
treemapClinData()