View source: R/cdisc_validate.R
| validate_cdisc | R Documentation |
Main validation entry point that checks whether a data frame conforms to CDISC standards.
If domain and standard are not provided, they are automatically detected via
detect_cdisc_domain(). Dispatches to validate_sdtm() or validate_adam() as appropriate.
validate_cdisc(df, domain = NULL, standard = NULL)
df |
A data frame to validate. |
domain |
Optional character string specifying the CDISC domain code (e.g., "DM", "AE") or ADaM dataset name (e.g., "ADSL", "ADAE"). If NULL, auto-detected. |
standard |
Optional character string: "SDTM" or "ADaM". If NULL, auto-detected. |
A data frame with columns:
category |
Character: type of validation issue ("Missing Required Variable", "Missing Expected Variable", "Type Mismatch", "Non-Standard Variable", "Variable Info") |
variable |
Character: variable name |
message |
Character: description of the issue |
severity |
Character: "ERROR", "WARNING", or "INFO" |
# Auto-detect domain
dm <- data.frame(
STUDYID = "STUDY001",
USUBJID = "SUBJ001",
DMSEQ = 1,
RACE = "WHITE",
stringsAsFactors = FALSE
)
results <- validate_cdisc(dm)
print(results)
# Validate with explicit domain specification
results <- validate_cdisc(dm, domain = "DM", standard = "SDTM")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.