'pharmaverse' Adapters for R4SUB Submission Readiness Evidence

Bridges the 'pharmaverse' clinical reporting stack and the R4SUB (Ready for Submission) ecosystem. Converts 'metacore' metadata objects and ADaM (Analysis Data Model) datasets - such as those built with 'admiral' - into standardized R4SUB evidence table rows via 'r4subcore', so that submission readiness can be scored with 'r4subscore' without changing an existing pharmaverse pipeline.


r4subpharma

R-CMD-check Lifecycle: experimental License: MIT

r4subpharma connects the pharmaverse clinical reporting stack to the R4SUB (Ready for Submission) ecosystem. It turns the metadata and datasets a pharmaverse pipeline already produces into standardized R4SUB evidence, so submission readiness can be scored with r4subscore, without changing your pipeline.

Why

A pharmaverse workflow already generates the signals that describe how ready a deliverable is: whether every variable is documented, whether an ADaM dataset matches its metadata, whether types and labels are in place. Those signals are usually discarded as console warnings. r4subpharma captures them as evidence and feeds them to a single, defensible Submission Confidence Index (SCI).

Installation

# install.packages("pak")
pak::pak("R4SUB/r4subpharma")

The metadata contract

Both adapters work from one small table, one row per dataset variable, that [as_variable_metadata()] builds from either a metacore object or a plain data.frame:

Column Meaning
dataset, variable Identify the variable (required)
label, type Documentation attributes
origin, derivation, is_derived Provenance

Quick start

library(r4subpharma)

meta <- data.frame(
  dataset  = "ADSL",
  variable = c("USUBJID", "AGE", "SEX"),
  label    = c("Unique Subject Identifier", "Age", "Sex"),
  type     = c("text", "integer", "text"),
  origin   = c("Predecessor", "Derived", "Predecessor"),
  derivation = c(NA, "Age at informed consent", NA),
  stringsAsFactors = FALSE
)

adsl <- data.frame(USUBJID = "01-001", AGE = 54, SEX = "M")

ctx <- r4subcore::r4sub_run_context("STUDY01", "PROD")
res <- submission_readiness(list(ADSL = adsl), meta, ctx)

res$sci$SCI    # Submission Confidence Index, 0-100
res$sci$band   # decision band

In a real pipeline the metadata comes from metacore and the datasets from admiral; the call is otherwise identical.

How evidence maps to the SCI pillars

Adapter Indicators SCI pillar
metacore_to_evidence() Q-DEFINE-002, Q-DEFINE-003 quality
adam_to_evidence() T-ADAM-001, T-ADAM-002 trace
adam_to_evidence() Q-ADAM-001 quality
adam_to_evidence() Q-ADAM-002 usability

See vignette("r4subpharma") for the full walkthrough.

Part of the R4SUB ecosystem

License

MIT © Pawan Rama Mali

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("r4subpharma")

0.1.0 by Pawan Rama Mali, a month ago


https://r4sub.github.io/r4subpharma/, https://github.com/R4SUB/r4subpharma


Report a bug at https://github.com/R4SUB/r4subpharma/issues


Browse source code at https://github.com/cran/r4subpharma


Authors: Pawan Rama Mali [aut, cre, cph] (ORCID:


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports cli, r4subcore, tibble

Suggests knitr, metacore, pharmaverseadam, r4subdata, r4subprofile, r4subscore, rmarkdown, testthat


See at CRAN