Skip to content
jwildfire edited this page Sep 23, 2019 · 27 revisions

Note: No additional development is currently planned on this package, but the safetyGraphics package has replaced it (with improvements!) for most purposes and is under active development.


Overview

safetyexploreR is an R package built using the HTML Widgets framework. safetyexploreR serves as an interface for Rho's safety explorer suite, a set of tools facilitating the exploration of adverse events, lab and vital sign data. The underlying tools are built using Webcharts, a JavaScript library based on d3.js.

Installation

safetyexploreR is still in development. The development version of this package can be installed using the following R code:

devtools::install_github('RhoInc/safetyexploreR', build_vignettes=TRUE)

Data specifications

Data requirements for Adverse Events Explorer and Timeline

The adverse events widgets require a data.frame that has a structure of 1 record per adverse event per subject. Required and optional variables are below. In parentheses are the required names for default settings.

Required variables include:

  • Unique participant ID ("USUBJID")
  • Adverse event major category ("AEBODSYS")
  • Adverse event minor category ("AEDCOD")
  • Adverse event reported term ("AETERM")
  • Group variable ("ARM")
  • Sequence number ("AESEQ")
  • Adverse event start date ("ASTDY")
  • Adverse event end date ("AENDY")

Optional variables include:

  • Adverse event seriousness ("AESER")
  • Adverse event severity ("AESEV")
  • Adverse event relationship ("AEREL")
  • Adverse event outcome ("AEOUT")
  • variables to be used in grouping, filtering, or listing such as: treatment arm, site ID, sex, race, query flag

Requirements for Safety Histogram, Outlier Explorer, Results Over Time, and Shift Plot

The other 4 safety widgets require a data.frame that has a structure of 1 record per value per visit per subject. Required and optional variables are below. In parentheses are the required names for default settings.

Required variables include:

  • Unique participant ID ("USUBJID")
  • Measure ("TEST")
  • Value ("STRESN")
  • Unit ("STRESU")
  • Normal range - lower limit ("STNRLO")
  • Normal range - upper limit ("STNRHI")
  • Timing of collection ("DY", "VISITN", "VISIT")

Optional variables include:

  • Age, sex, and race ("AGE", "SEX", "RACE")
  • variables to be used in grouping, filtering, or listing such as: treatment arm, site ID, query flag

Examples

There are two built-in example datasets, ADAE and ADBDS. Default charts can be rendered with the following code:

aeExplorer(data=ADAE)

aeTimelines(data=ADAE)

safetyHistogram(data=ADBDS)

safetyOutlierExplorer(data=ADBDS)

safetyResultsOverTime(data=ADBDS)

safetyShiftPlot(data=ADBDS)

Use

SafetyexploreR widgets can be rendered directly within your RStudio desktop application. You can embed widgets within an R Markdown report or a Shiny web application.

Shiny Apps

There are two Shiny apps included into the page that can be run locally with the following code:

runAeTableApp()

runSafetyApp()

These apps are also hosted on shinyapps.io:

  • Shiny app for the AE Table using aeExplorer() can be found here.
  • Shiny app for the Safety Explorer suite can be found here.

Clone this wiki locally