formatDataForPlotClinData {clinDataReview}R Documentation

Format data for interactive plot for clinical data

Description

Format data for interactive plot for clinical data

Usage

formatDataForPlotClinData(
  data,
  hoverVars = NULL,
  hoverLab = getLabelVar(hoverVars, labelVars = labelVars),
  hoverByVar = NULL,
  keyVar = NULL,
  id = paste0("plotClinData", sample.int(n = 1000, size = 1)),
  labelVars = NULL
)

Arguments

data

Data.frame with data.

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 hoverVars.

hoverByVar

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.

keyVar

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

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.

labelVars

Named character vector containing variable labels.

Value

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.

Author(s)

Laure Cougnaud


[Package clinDataReview version 1.5.0 Index]