Travis-CI Build Status CRAN_Status_Badge

safetyGraphics: Clinical Trial Safety Graphics with R

The safetyGraphics package provides a framework for evaluation of clinical trial safety in R. It includes several safety-focused visualizations to empower clinical data monitoring. Chief among these is the Hepatic Explorer, based on the Evaluation of the Drug-Induced Serious Hepatotoxicity (eDish) visualization. A demo of the Hepatic Explorer interactive graphic is available here and is shown below.

This package is being built in conjunction with the hep-explorer javascript library.



Users can interactively explore their data with a shiny application or create standalone interactive charts.

Shiny application

The Shiny app provides a simple interface for: - Loading data - Customizing settings and data mappings - Viewing and exporting the interactive graphics

safetyGraphicsApp() #open the shiny application

Standalone charts

Users can also initialize customized standalone charts with a few lines of code.


settings <- list(
  id_col = "USUBJID",
  value_col = "AVAL",
  measure_col = "PARAM",
  visit_col = "VISIT",
  visitn_col = "VISITNUM",
  studyday_col = "ADY",
  normal_col_low = "A1LO",
  normal_col_high = "A1HI",
  measure_values = list(ALT = "Alanine Aminotransferase (U/L)",
                        AST = "Aspartate Aminotransferase (U/L)",
                        TB = "Bilirubin (umol/L)",
                        ALP = "Alkaline Phosphatase (U/L)")

chartRenderer(data=adlbc, settings=settings, chart="hepexplorer")