compute_ard.RdWalks each analysis in an ardflow_spec and computes a CDISC Analysis Results
Data (ARD) object using the cards engine. Continuous analyses use
cards::ard_continuous(); categorical analyses use cards::ard_categorical().
Each result is stamped with traceability metadata (input rows, variables, by
variables and a timestamp).
compute_ard(spec, data = NULL)An object of class ardflow_ard: a named list (one entry per analysis
id) of cards/tibble ARDs, each carrying an ardflow_trace attribute.
spec_path <- system.file("specs", "demographics.yaml", package = "ardflow")
if (nzchar(spec_path) && requireNamespace("pharmaverseadam", quietly = TRUE)) {
compute_ard(read_spec(spec_path))
}
#>
#> ── ardflow ARD set ─────────────────────────────────────────────────────────────
#> ℹ 3 analysis result(s) computed
#> ✔ [t_age] Table 14-1.1 Summary of Age (Years) by Treatment Arm - 32 ARD rows from 306 input rows
#> ✔ [t_sex] Table 14-1.2 Sex Distribution by Treatment Arm - 24 ARD rows from 306 input rows
#> ✔ [t_ae_soc] Table 14-3.1 Adverse Events by System Organ Class - 207 ARD rows from 1191 input rows