Learn R Programming

⚠️There's a newer version (2.1.1) of this package.Take me there.

safetyGraphics: Clinical Trial Safety Graphics with R

The safetyGraphics package provides a framework for evaluation of clinical trial safety in R. The initial release focuses on Evaluation of Drug-Induced Serious Hepatotoxicity (eDISH). A prototype of the eDish interactive graphic is available here and is shown below.

This package is being built in conjunction with the safety-eDISH javascript library. Both packages are under active development with beta testing and an initial release planned for early 2019.

Usage

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
devtools::install_github("ASA-DIA-InteractiveSafetyGraphics/safetyGraphics")
library("safetyGraphics")
chartBuilderApp() #open the shiny application

Standalone charts

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

devtools::install_github("ASA-DIA-InteractiveSafetyGraphics/safetyGraphics")
library("safetyGraphics")
eDISH(data=adlbc, 
      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)"))

Copy Link

Version

Install

install.packages('safetyGraphics')

Monthly Downloads

236

Version

0.7.3

License

MIT + file LICENSE

Maintainer

Jeremy Wildfire

Last Published

February 4th, 2019

Functions in safetyGraphics (0.7.3)

checkColumnSetting

Check that a setting parameter has a matching data column
eDISH

Create an eDISH widget
generateSettings

Generate a settings object based on a data standard
getSettingsMetadata

Get metadata about chart settings
safetyGraphicsApp

Run the interactive safety graphics builder
validateSettings

Compare a settings object with a specified data set
eDISH-shiny

Shiny bindings for eDISH
detectStandard

Detect the data standard used for a data set
checkSettingProvided

Check that the user has provided a valid for a given settings parameter
compare_cols

Compares contents of 2 vectors
getSettingKeys

Get setting keys matching a pattern
getSettingValue

Retrieve the value for a given named parameter
checkFieldSettings

Check that a setting parameter has a matching data field
checkNumericColumns

Check that settings for mapping numeric data are associated with numeric columns
settingsMetadata

Settings Metadata
textKeysToList

Helper function to convert keys from text to nested lists
adlbc

Safety measures sample data
getRequiredColumns

Get a list of required columns
getRequiredSettings

Get a list of required settings