eDISH scatter of peak liver measures with Hy’s Law quadrants and participant drill-down to standardized values by study day.
The chart below is live — rendered by the safety.viz
hepExplorer module on the package’s example data, with the
full control sidebar. measure_values maps the
ALT/AST/TB/ALP keys onto this dataset’s measure names, and the visit
sequence stands in for study day.
The same chart ships as a gsm-idiom report workflow. Run it with
gsm.core::RunWorkflow() to produce a standalone HTML
report, or use the matching runner script:
lWorkflow <- yaml::read_yaml(
system.file("workflow", "3_reports", "hep_explorer.yaml", package = "gsm.safety")
)
gsm.core::RunWorkflow(
lWorkflow = lWorkflow,
lData = list(dfResults = ExampleData("adbds"))
)
Rscript inst/examples/hep-explorer.R <output-dir>
hep_explorer.yaml workflow
meta:
Type: Report
ID: hep_explorer
Output: html
Name: Hepatic Safety Explorer Report
Description: Interactive safety.viz eDISH hepatic safety explorer with Hy's Law quadrants and participant drill-down.
lSettings:
studyday_col: VISITNUM
visit_col: VISIT
visitn_col: VISITNUM
measure_values:
ALT: Alanine Aminotransferase
AST: Aspartate Aminotransferase
TB: Bilirubin
ALP: Alkaline Phosphatase
filters:
- value_col: SEX
label: Sex
- value_col: ARM
label: Treatment Group
groups:
- value_col: ARM
label: Treatment Group
- value_col: SEX
label: Sex
spec:
dfResults:
USUBJID:
type: character
TEST:
type: character
STRESN:
type: numeric
STNRHI:
type: numeric
steps:
- output: strOutputDir
name: getwd
- output: lWidget
name: gsm.safety::Widget_HepExplorer
params:
dfResults: dfResults
lSettings: lSettings
- output: strReportPath
name: gsm.safety::SaveWidgetReport
params:
widget: lWidget
strOutputDir: strOutputDir
strOutputFile: ID
library(gsm.safety)
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")
)
)
)