if (FALSE) {
# Create sample datasets
dm1 <- data.frame(
STUDYID = "STUDY001",
USUBJID = c("SUBJ001", "SUBJ002"),
DMSEQ = c(1, 1),
RACE = c("WHITE", "BLACK OR AFRICAN AMERICAN")
)
dm2 <- data.frame(
STUDYID = "STUDY001",
USUBJID = c("SUBJ001", "SUBJ003"),
DMSEQ = c(1, 1),
RACE = c("WHITE", "ASIAN")
)
result <- cdisc_compare(dm1, dm2, domain = "DM")
# Generate text report to console
generate_cdisc_report(result, output_format = "text")
# Generate HTML report to file
out <- file.path(tempdir(), "report.html")
generate_cdisc_report(result, output_format = "html", file_name = out)
}
Run the code above in your browser using DataLab