View source: R/plots-countClinData.R
plotCountClinData | R Documentation |
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", titleExtra = NULL, title = paste(paste(valueLab, "by", paste(varsLab, collapse = " and "), titleExtra), collapse = "<br>"), 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") )
data |
Data.frame with data. |
vars |
Character vector with variables of |
varsLab |
Named character vector with labels for |
valueVar |
String with numeric variable of |
valueLab |
String with label for the |
colorVar |
(optional) String with coloring variable (NULL by default). By default, the treemap is colored based by section. |
colorLab |
String with label for |
colorPalette |
(optional) Named character vector with color palette.
If not specified, the viridis color palette is used. |
colorRange |
(optional) Numeric vector of length 2 with range for the color variable, in case it is a numeric variable. |
valueType |
String with type of values in |
titleExtra |
String with extra title for the plot (appended after |
title |
String with title for the plot. |
subtitle |
String with subtitle. |
caption |
String with caption. |
labelVars |
Named character vector containing variable labels. |
width |
Numeric, width of the plot in pixels, 700 by default. |
height |
Numeric, height of the plot in pixels, 700 by default. |
pathVar |
String with variable of <a href="./path-to-report">label</a> .
|
pathLab |
String with label for |
hoverVars |
Character vector with variable(s) to be displayed in the hover, by default any position and aesthetic variables displayed in the plot. |
hoverLab |
Named character vector with labels for |
table |
Logical, if TRUE (FALSE by default)
returns also a |
tableVars |
Character vector with variables to be included in the table. |
tableLab |
Named character vector with labels
for each |
tableButton |
Logical, if TRUE (by default) the table is included within an HTML button. |
tablePars |
List with parameters passed to the
|
id |
String with general id for the plot:
If not specified, a random id, as 'plotClinData[X]' is used. |
verbose |
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. |
typePlot |
String with plot type, 'treemap' or 'sunburst'. |
Either:
if a table
is requested:
a clinDataReview
object, a.k.a a list with the
'plot' (plotly
object) and 'table'
(datatable
object)
otherwise: a plotly
object
Laure Cougnaud
Other visualizations of summary statistics for clinical data:
barplotClinData()
,
boxplotClinData()
,
errorbarClinData()
,
sunburstClinData()
,
treemapClinData()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.