Package 'cardinalfda'

Title: FDA Safety Tables and Figures
Description: Provides implementations of safety tables and figures recommended by the FDA (U.S. Food and Drug Administration) for clinical trial reporting. Functions generate standard outputs for adverse events, laboratory abnormalities, vital signs, exposure, and other safety domains following the FDA's Safety Reporting guidelines. Outputs are built on the 'gtsummary', 'cards', and 'cardx' frameworks, enabling reproducible and submission-ready clinical trial safety summaries.
Authors: Pawel Rucki [ctb], Abinaya Yogasekaram [aut] (ORCID: <https://orcid.org/0009-0005-2083-1105>), Joe Zhu [cre] (ORCID: <https://orcid.org/0000-0001-7566-2787>), Daniel D. Sjoberg [ctb] (ORCID: <https://orcid.org/0000-0003-0862-2018>), Emily de la Rua [aut] (ORCID: <https://orcid.org/0009-0000-8738-5561>), Davide Garolini [aut] (ORCID: <https://orcid.org/0000-0002-1445-1369>), Vincent Shen [aut], Benoit Falquet [ctb] (ORCID: <https://orcid.org/0000-0002-4434-3799>), Lluís Revilla Sancho [ctb] (ORCID: <https://orcid.org/0000-0001-9747-2570>), Huan Lu [ctb], Alex Assuied [ctb], Yoshito Koujin [ctb], Korbinian Matthias [ctb], Jessica Knizia [ctb], Freeman Wang [ctb]
Maintainer: Joe Zhu <[email protected]>
License: Apache License (>= 2)
Version: 0.3.0.9000
Built: 2026-10-10 07:39:44 UTC
Source: https://github.com/pharmaverse/cardinal

Help Index


Run a Table or Figure Template Script

Description

Source one of the self-contained template scripts shipped in inst/templates and return the object it builds. Each template is a plain R script that produces a tbl object (and, where relevant, an ard), so the same script can be run here for testing, copied into the catalog, or handed to a user as a starting point.

Keeping the full script as the single source of truth avoids drifting between what is tested and what is published in the catalog.

Usage

run_template(name, envir = new.env(parent = parent.frame()))

Arguments

name

(character(1))
template name without extension, e.g. "fda-table_07". Must match a file ⁠inst/templates/<name>.R⁠.

envir

(environment)
environment in which the script is evaluated. A fresh child of the caller is used by default so template objects do not leak into the caller.

Value

the environment the template was evaluated in, invisibly. Template objects (such as tbl and ard) are available as bindings in it.

Examples

## Not run: 
env <- run_template("fda-table_07")
env$tbl

## End(Not run)