mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2024-10-30 11:31:52 +01:00
23 lines
535 B
R
23 lines
535 B
R
|
if (requireNamespace("readr", quietly = TRUE)) {
|
||
|
|
||
|
context("Compatibility with readr")
|
||
|
|
||
|
metadata <- readr::read_csv(
|
||
|
get_data_location(
|
||
|
"ExampleProject_DataDictionary_2018-06-07.csv"
|
||
|
)
|
||
|
)
|
||
|
|
||
|
records <- readr::read_csv(
|
||
|
get_data_location(
|
||
|
"ExampleProject_DATA_2018-06-07_1129.csv"
|
||
|
)
|
||
|
)
|
||
|
|
||
|
test_that("Data read in with `readr` will return correct result", {
|
||
|
redcap_output_readr <- REDCap_split(records, metadata)
|
||
|
expect_known_hash(redcap_output_readr, "bde303d330fba161ca500c10cfabb693")
|
||
|
})
|
||
|
|
||
|
}
|