formatPlotlyClinData: Format interactive plot, with possibility to download patient...

Description Usage Arguments Value Author(s)

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

Description

Format interactive plot, with possibility to download patient profiles on a click event.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
formatPlotlyClinData(
  pl,
  data,
  idVar = "USUBJID",
  pathVar = NULL,
  pathDownload = TRUE,
  idFromDataPlot = FALSE,
  idVarPlot = "key",
  labelVarPlot = NULL,
  highlightOn = "plotly_click",
  highlightOff = "plotly_doubleclick",
  id = paste0("plotClinData", sample.int(n = 1000, size = 1)),
  verbose = FALSE
)

Arguments

pl

ggplotly object.

data

Data.frame with data.

idVar

String with variable of data containing plot element.

pathVar

String with variable of data containing path to a subject-specific report (e.g. patient profiles).

pathDownload

Logical, if TRUE (by default) the subject-specific report(s) are downloaded in a zip compressed file. If FALSE (only available if unique report per idVarPlot), each report is opened in a new window.

idFromDataPlot

Logical, if TRUE (by default) idVarPlot is extracted from the data of the plot output object (e.g. if this plot was created from ggplotly), otherwise directly from the plot object (if the plot was created from plot_ly directly).

idVarPlot

String with variable in the plotly output containing IDs.

labelVarPlot

String with plotly variable used to extract label to build the file name of the zip compressed file containing patient report. If not specified, the label are extracted based on the idVarPlot of the selected plot element.

highlightOn

String with event to turn on the selection (on parameter of highlight), 'plotly_click' by default.

highlightOff

String with event to turn off the selection (off parameter of highlight), 'plotly_doubleclick' by default.

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.

verbose

Logical, if TRUE report progress messages during execution (included in the browser 'Console').

Value

Updated plotly object.

Author(s)

Laure Cougnaud


clinDataReview documentation built on July 14, 2021, 5:08 p.m.