addSelectBtn: Add selection box(es) to a plotly plot.

View source: R/plots-utility-formatPlotlyClinData.R

addSelectBtnR Documentation

Add selection box(es) to a plotly plot.

Description

Add selection box(es) to a plotly plot.

Usage

addSelectBtn(
  data,
  pl,
  selectVars = NULL,
  selectLab = NULL,
  labelVars = NULL,
  id = paste0("plotClinData", sample.int(n = 1000, size = 1)),
  keyVar
)

Arguments

data

SharedData object used for the plot.

pl

plotly object.

selectVars

(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).

selectLab

(Named) character vector with label for selectVars.

labelVars

Named character vector containing variable labels.

id

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.

keyVar

String with unique key variable, identifying unique group for which the link between the table and the plot should be done.

Value

if selectVars is specified: a browsable object combining the select buttons and the plotly object.
Otherwise, the input plotly object.


clinDataReview documentation built on March 7, 2023, 5:13 p.m.