Compares several EDC database extractions and returns:
Details
a summary table of the detected differences in datasets/columns presence
a summary plot of the differences in number of rows, columns, patients, and rows per patient
Examples
#list of 3 edc_databases, each being a list of multiple datasets
databases = edc_example_multiple()
comparison = compare_databases(databases)
#> Warning: Some database extraction dates are not unique: "extract_2024_01_01"
comparison$table
dataset
2024-01-01 (#0)
2024-01-01 (#1)
2024-04-01
This table reflects changes in the dataset structure only,
not in the underlying data.
comparison$figures
#> NULL
#in real world, you should better use paths with a reader function:
if (FALSE) { # \dontrun{
databases = c(
"data/MYPROJECT_ExportTemplate_xxx_SAS_XPORT_2024_06_01_12_00.zip",
"data/MYPROJECT_ExportTemplate_xxx_SAS_XPORT_2024_08_01_12_00.zip",
"data/MYPROJECT_ExportTemplate_xxx_SAS_XPORT_2024_09_01_12_00.zip",
)
#`pw` is passed to `read_trialmaster()`
comparison = compare_databases(databases, fun_read=read_trialmaster, pw="the_password")
} # }
