Checks what proportion of derived variables have derivation text documented.
Returns one evidence row per dataset summarising annotation coverage, with
indicator_id = "U-003".
Arguments
- metadata
A data frame with columns
dataset,variable,origin, andderivation.- ctx
A run context created by
r4subcore::r4sub_run_context().- config
A configuration list from
usability_config_default(). IfNULLthe default configuration is used.
Value
A validated evidence tibble (see r4subcore::as_evidence()).
Examples
ctx <- r4subcore::r4sub_run_context(study_id = "STUDY01")
#> ℹ Run context created: "R4S-20260316173057-wl4dieex"
meta <- data.frame(
dataset = c("ADSL", "ADSL", "ADSL"),
variable = c("AGE", "SEX", "RACE"),
origin = c("Derived", "CRF", "Derived"),
derivation = c("Derived from BRTHDTC", NA, NA),
stringsAsFactors = FALSE
)
ev <- assess_annotation_coverage(meta, ctx)
#> ✔ Evidence table created: 1 row
ev$metric_value
#> [1] 0.5