Add selection box(es) to a plotly plot.
addSelectBtn(
data,
pl,
selectVars = NULL,
selectLab = NULL,
labelVars = NULL,
id = paste0("plotClinData", sample.int(n = 1000, size = 1)),
keyVar
)if selectVars is specified: a browsable
object combining the select buttons and the plotly object.
Otherwise, the input plotly object.
SharedData object used for the plot.
plotly object.
(optional) Character vector with variable(s) from data
for which a selection box should be included. This enables to select the data
displayed in the plot (and associated table).
(Named) character vector with label for selectVars.
Named character vector containing variable labels.
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.
String with unique key variable, identifying unique group for which the link between the table and the plot should be done.