This example renders the interactive AE Explorer report artifact from
a small mapped subject/adverse-event data set. The widget settings are
read from the same workflow YAML used by the workr
example.
workflow_path <- system.file(
"workflow", "3_reports", "ae_explorer.yaml",
package = "gsm.safety"
)
if (!nzchar(workflow_path)) {
workflow_path <- file.path("inst", "workflow", "3_reports", "ae_explorer.yaml")
}
lWorkflow <- yaml::read_yaml(workflow_path)
lData <- gsm.safety::MakeExampleData()
#> Registered S3 method overwritten by 'logger':
#> method from
#> print.loglevel log4r
aeData <- list(
dm = lData$Mapped_SUBJ,
aes = lData$Mapped_AE
)
initialized <- safetyCharts::init_aeExplorer(
data = aeData,
settings = lWorkflow$meta$widgetSettings
)
lReport <- gsm.safety::RenderSafetyChartsWidget(
lInitialized = initialized,
strWidgetName = "aeExplorer",
strOutputDir = tempdir(),
strOutputFile = "ae_explorer_example"
)
lReport$path
#> [1] "/tmp/Rtmp3CuZEf/ae_explorer_example.html"