8000 GitHub - guigui351/tornadoplot: Adverse Event Tornado Plot designed for use with {safetyGraphics}.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

guigui351/tornadoplot

Repository files navigation

tornado - Plot

Tornado Plots are a special type of Bar chart, where the data categories are listed vertically instead of the standard horizontal presentation, and the categories are ordered so that the largest bar appears at the top of the chart, the second largest appears second from the top, and so on. They are so named because the final chart visually resembles either one half of or a complete tornado.

tornadoplot App screenshot.

Installation

You can install the development version of tornadoplot like so:

devtools::install_github('guigui351/tornadoplot', ref="main")

and run it as follow:

library(torndadoplot)
library(tidyverse)
library(safetyData)

# Remove screen failures data
sdtm_dm <- safetyData:: sdtm_dm %>% filter (ARMCD != "Scrnfail") 

# settings for tornado plot
setting <-list(
  aes=list(id_col="USUBJID", bodsys_col="AEBODSYS", term_col="AEDECOD", severity_col="AESEV", serious_col="AESER"),
  dm=list(id_col="USUBJID", treatment_col="ARM")
)

# params to be loaded for the tornado plot / mandatory except if it runs with SafetyGraphics
params <- list(data = list(dm = sdtm_dm, aes = safetyData::sdtm_ae), settings = setting)

# standalone tornadoplot / params parameter automatically called by the run_app function
tornadoplot::run_app()

Or run in safetyGraphics:

library(torndadoplot)
library(safetyGraphics)
library(tidyverse)

# Load standard graphics from safetyCharts + Tornado plot
charts<-c(
    safetyGraphics::makeChartConfig(),
    safetyGraphics::makeChartConfig(packages="torndadoplot")
)

# List of stm data to be used in the app
sdtm <- list(dm = sdtm_dm, aes = safetyData::sdtm_ae)

# Make metadata
meta_charts <- makeMeta(charts)

# Initialize SafetyGraphics app.
safetyGraphics::safetyGraphicsApp(domainData = sdtm, charts=charts, meta = meta_charts)

About

Adverse Event Tornado Plot designed for use with {safetyGraphics}.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0