Skip to contents

A widget that renders the safety.viz hepatic safety explorer: an eDISH scatter plot of peak liver measures (ALT vs. total bilirubin, as multiples of the upper limit of normal) with Hy's Law quadrants, participant drill-down to a standardized-values-by-study-day view, and a linked measure table.

Usage

Widget_HepExplorer(
  dfResults,
  lSettings = list(),
  width = NULL,
  height = NULL,
  elementId = NULL,
  bDebug = FALSE
)

Arguments

dfResults

data.frame Long-format results data, one record per measurement. Column names are supplied by lSettings; the defaults expect TEST/STRESN/USUBJID/STNRHI (see inst/schema/hep-explorer.json). The measure_values setting maps the ALT/AST/TB/ALP keys onto the dataset's measure names.

lSettings

list safety.viz hep-explorer settings overrides; merged onto the module's DEFAULT_SETTINGS client-side, so only overrides are needed.

width

character Width of the widget as a CSS unit. Default: NULL.

height

character Height of the widget as a CSS unit. Default: NULL.

elementId

character ID of the widget's HTML element. Default: NULL.

bDebug

logical Print debug messages in the browser console? Default: FALSE.

Examples

dfResults <- ExampleData("adbds")

Widget_HepExplorer(
  dfResults,
  lSettings = list(
    studyday_col = "VISITNUM",
    visit_col = "VISIT",
    visitn_col = "VISITNUM",
    measure_values = list(
      ALT = "Alanine Aminotransferase",
      AST = "Aspartate Aminotransferase",
      TB = "Bilirubin",
      ALP = "Alkaline Phosphatase"
    ),
    filters = list(
      list(value_col = "SEX", label = "Sex"),
      list(value_col = "ARM", label = "Treatment Group")
    ),
    groups = list(
      list(value_col = "ARM", label = "Treatment Group"),
      list(value_col = "SEX", label = "Sex")
    )
  )
)