2023-01-16 09:49:17 +01:00
|
|
|
## "Longitudinal data"
|
2018-06-25 06:39:56 +02:00
|
|
|
|
|
|
|
test_that("CSV export matches reference", {
|
2023-04-13 10:57:04 +02:00
|
|
|
file_paths <- vapply(
|
2018-06-25 06:39:56 +02:00
|
|
|
c(
|
|
|
|
records = "WARRIORtestForSoftwa_DATA_2018-06-21_1431.csv",
|
|
|
|
metadata = "WARRIORtestForSoftwareUpgrades_DataDictionary_2018-06-21.csv"
|
2023-04-13 10:57:04 +02:00
|
|
|
), get_data_location, FUN.VALUE = "character"
|
2018-06-25 06:39:56 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
redcap <- lapply(file_paths, read.csv, stringsAsFactors = FALSE)
|
|
|
|
redcap[["metadata"]] <- with(redcap, metadata[metadata[,1] > "",])
|
|
|
|
redcap_output <- with(redcap, REDCap_split(records, metadata))
|
|
|
|
|
|
|
|
|
2019-07-09 00:01:48 +02:00
|
|
|
expect_known_hash(redcap_output, "0934bcb292")
|
2018-06-25 06:39:56 +02:00
|
|
|
})
|