View source: R/evidence_schema.R
| as_evidence | R Documentation |
Takes a data.frame and coerces it into a valid evidence table. Fills in
missing nullable columns with NA of the correct type and validates
controlled vocabulary columns.
as_evidence(x, ctx = NULL, ...)
x |
A data.frame (or tibble) with at least the required evidence columns. |
ctx |
An optional r4sub_run_context. If provided, |
... |
Additional columns to set (e.g., |
A data.frame conforming to the evidence schema.
ctx <- r4sub_run_context("STUDY1", "DEV")
df <- data.frame(
asset_type = "validation",
asset_id = "ADSL",
source_name = "pinnacle21",
indicator_id = "P21-001",
indicator_name = "Missing variable",
indicator_domain = "quality",
severity = "high",
result = "fail",
message = "Variable AGEU missing",
stringsAsFactors = FALSE
)
ev <- as_evidence(df, ctx = ctx)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.