
Format data for interactive plot for clinical data
formatDataForPlotClinData(
data,
hoverVars = NULL,
hoverLab = getLabelVar(hoverVars, labelVars = labelVars),
hoverByVar = NULL,
keyVar = NULL,
id = paste0("plotClinData", sample.int(n = 1000, size = 1)),
labelVars = NULL
)
SharedData
object containing the data
,
with an extra column: 'hover' with the combined info from hoverVars
,
and the key defined as keyVar
and group as id
.
Data.frame with data.
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
.
Character vector with variables identifying unique elements in the plot, usually x, y, facet variables. These variables are used to identify records with the same position in the plot, their information are combined in the hover.
String with unique key variable, identifying unique group for which the link between the table and the plot should be done.
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.
Named character vector containing variable labels.
Laure Cougnaud