Skip to content

Commit

Permalink
update for read-oneshot-eav
Browse files Browse the repository at this point in the history
ref #542
  • Loading branch information
wibeasley committed Oct 14, 2024
1 parent 420f703 commit a3c595a
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,9 @@ NA), dob = c("2003-08-30", "2003-03-10", "1934-04-09", "1952-11-02",
"A mouse character from a good book", "completely made up",
"This record doesn't have a DAG assigned\n\nSo call up Trudy on the telephone\nSend her a letter in the mail",
"Had a hand for trouble and a eye for cash\n\nHe had a gold watch chain and a black mustache",
NA), race___1 = c(FALSE, FALSE, FALSE, FALSE, TRUE, FALSE
), race___2 = c(FALSE, FALSE, FALSE, TRUE, FALSE, FALSE),
race___3 = c(FALSE, TRUE, FALSE, FALSE, FALSE, FALSE), race___4 = c(FALSE,
FALSE, TRUE, FALSE, FALSE, FALSE), race___5 = c(TRUE, TRUE,
TRUE, TRUE, FALSE, FALSE), race___6 = c(FALSE, FALSE, FALSE,
FALSE, TRUE, FALSE), ethnicity = c(1L, 1L, 0L, 1L, 2L, NA
), interpreter_needed = c(0L, 0L, 1L, NA, 0L, NA), demographics_complete = c(2L,
2L, 2L, 2L, 2L, 0L), health_complete = c(1L, 0L, 2L, 2L,
0L, NA), race_and_ethnicity_complete = c(2L, 0L, 2L, 2L,
2L, NA)), row.names = c(NA, -6L), class = c("tbl_df", "tbl",
"data.frame"))
NA), race___123456 = c(FALSE, FALSE, FALSE, FALSE, FALSE,
FALSE), ethnicity = c(1L, 1L, 0L, 1L, 2L, NA), interpreter_needed = c(0L,
0L, 1L, NA, 0L, NA), demographics_complete = c(2L, 2L, 2L,
2L, 2L, 0L), health_complete = c(1L, 0L, 2L, 2L, 0L, 0L),
race_and_ethnicity_complete = c(2L, 0L, 2L, 2L, 2L, 0L)), row.names = c(NA,
-6L), class = c("tbl_df", "tbl", "data.frame"))
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,9 @@ NA), dob = c("2003-08-30", "2003-03-10", "1934-04-09", "1952-11-02",
"A mouse character from a good book", "completely made up",
"This record doesn't have a DAG assigned\n\nSo call up Trudy on the telephone\nSend her a letter in the mail",
"Had a hand for trouble and a eye for cash\n\nHe had a gold watch chain and a black mustache",
NA), race___1 = c(FALSE, FALSE, FALSE, FALSE, TRUE, FALSE
), race___2 = c(FALSE, FALSE, FALSE, TRUE, FALSE, FALSE),
race___3 = c(FALSE, TRUE, FALSE, FALSE, FALSE, FALSE), race___4 = c(FALSE,
FALSE, TRUE, FALSE, FALSE, FALSE), race___5 = c(TRUE, TRUE,
TRUE, TRUE, FALSE, FALSE), race___6 = c(FALSE, FALSE, FALSE,
FALSE, TRUE, FALSE), ethnicity = c(1L, 1L, 0L, 1L, 2L, NA
), interpreter_needed = c(0L, 0L, 1L, NA, 0L, NA), demographics_complete = c(2L,
2L, 2L, 2L, 2L, 0L), health_complete = c(1L, 0L, 2L, 2L,
0L, NA), race_and_ethnicity_complete = c(2L, 0L, 2L, 2L,
2L, NA)), row.names = c(NA, -6L), class = c("tbl_df", "tbl",
"data.frame"))
NA), race___123456 = c(FALSE, FALSE, FALSE, FALSE, FALSE,
FALSE), ethnicity = c(1L, 1L, 0L, 1L, 2L, NA), interpreter_needed = c(0L,
0L, 1L, NA, 0L, NA), demographics_complete = c(2L, 2L, 2L,
2L, 2L, 0L), health_complete = c(1L, 0L, 2L, 2L, 0L, 0L),
race_and_ethnicity_complete = c(2L, 0L, 2L, 2L, 2L, 0L)), row.names = c(NA,
-6L), class = c("tbl_df", "tbl", "data.frame"))
16 changes: 6 additions & 10 deletions inst/test-data/specific-redcapr/read-oneshot-eav/default.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@ structure(list(record_id = 1:5, name_first = c("Nutmeg", "Tumtum",
comments = c("Character in a book, with some guessing", "A mouse character from a good book",
"completely made up", "This record doesn't have a DAG assigned\n\nSo call up Trudy on the telephone\nSend her a letter in the mail",
"Had a hand for trouble and a eye for cash\n\nHe had a gold watch chain and a black mustache"
), mugshot = c(197977L, 197978L, 197979L, 198002L, 198021L
), race___1 = c(FALSE, FALSE, FALSE, FALSE, TRUE), race___2 = c(FALSE,
FALSE, FALSE, TRUE, FALSE), race___3 = c(FALSE, TRUE, FALSE,
FALSE, FALSE), race___4 = c(FALSE, FALSE, TRUE, FALSE, FALSE
), race___5 = c(TRUE, TRUE, TRUE, TRUE, FALSE), race___6 = c(FALSE,
FALSE, FALSE, FALSE, TRUE), ethnicity = c(1L, 1L, 0L, 1L,
2L), interpreter_needed = c(0L, 0L, 1L, NA, 0L), demographics_complete = c(2L,
2L, 2L, 2L, 2L), health_complete = c(1L, 0L, 2L, 2L, 0L),
race_and_ethnicity_complete = c(2L, 0L, 2L, 2L, 2L)), row.names = c(NA,
-5L), class = c("tbl_df", "tbl", "data.frame"))
), mugshot = 22:26, race___123456 = c(FALSE, FALSE, FALSE,
FALSE, FALSE), ethnicity = c(1L, 1L, 0L, 1L, 2L), interpreter_needed = c(0L,
0L, 1L, NA, 0L), demographics_complete = c(2L, 2L, 2L, 2L,
2L), health_complete = c(1L, 0L, 2L, 2L, 0L), race_and_ethnicity_complete = c(2L,
0L, 2L, 2L, 2L)), row.names = c(NA, -5L), class = c("tbl_df",
"tbl", "data.frame"))
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ structure(list(record_id = 5L, name_first = "John Lee", name_last = "Walker",
address = "Hotel Suite\nNew Orleans LA, 70115", telephone = "(405) 321-5555",
email = "[email protected]", dob = "1955-04-15", age = 59L,
sex = 1L, height = 193.04, weight = 104L, bmi = 27.9, comments = "Had a hand for trouble and a eye for cash\n\nHe had a gold watch chain and a black mustache",
mugshot = 198021L, race___1 = TRUE, race___2 = FALSE, race___3 = FALSE,
race___4 = FALSE, race___5 = FALSE, race___6 = TRUE, ethnicity = 2L,
interpreter_needed = 0L, demographics_complete = 2L, health_complete = 0L,
race_and_ethnicity_complete = 2L), row.names = c(NA, -1L), class = c("tbl_df",
"tbl", "data.frame"))
mugshot = 26L, race___123456 = FALSE, ethnicity = 2L, interpreter_needed = 0L,
demographics_complete = 2L, health_complete = 0L, race_and_ethnicity_complete = 2L), row.names = c(NA,
-1L), class = c("tbl_df", "tbl", "data.frame"))
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ structure(list(record_id = 3:4, name_first = c("Marcus", "Trudy"
), dob = c("1934-04-09", "1952-11-02"), age = c(80L, 61L), sex = 1:0,
height = c(180L, 165L), weight = c(80L, 54L), bmi = c(24.7,
19.8), comments = c("completely made up", "This record doesn't have a DAG assigned\n\nSo call up Trudy on the telephone\nSend her a letter in the mail"
), mugshot = c(197979L, 198002L), race___1 = c(FALSE, FALSE
), race___2 = c(FALSE, TRUE), race___3 = c(FALSE, FALSE),
race___4 = c(TRUE, FALSE), race___5 = c(TRUE, TRUE), race___6 = c(FALSE,
FALSE), ethnicity = 0:1, interpreter_needed = c(1L, NA),
demographics_complete = c(2L, 2L), health_complete = c(2L,
2L), race_and_ethnicity_complete = c(2L, 2L)), row.names = c(NA,
-2L), class = c("tbl_df", "tbl", "data.frame"))
), mugshot = 24:25, race___123456 = c(FALSE, FALSE), ethnicity = 0:1,
interpreter_needed = c(1L, NA), demographics_complete = c(2L,
2L), health_complete = c(2L, 2L), race_and_ethnicity_complete = c(2L,
2L)), row.names = c(NA, -2L), class = c("tbl_df", "tbl",
"data.frame"))
16 changes: 6 additions & 10 deletions inst/test-data/specific-redcapr/read-oneshot-eav/label-header.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@ structure(list(record_id = 1:5, name_first = c("Nutmeg", "Tumtum",
comments = c("Character in a book, with some guessing", "A mouse character from a good book",
"completely made up", "This record doesn't have a DAG assigned\n\nSo call up Trudy on the telephone\nSend her a letter in the mail",
"Had a hand for trouble and a eye for cash\n\nHe had a gold watch chain and a black mustache"
), mugshot = c(197977L, 197978L, 197979L, 198002L, 198021L
), race___1 = c(FALSE, FALSE, FALSE, FALSE, TRUE), race___2 = c(FALSE,
FALSE, FALSE, TRUE, FALSE), race___3 = c(FALSE, TRUE, FALSE,
FALSE, FALSE), race___4 = c(FALSE, FALSE, TRUE, FALSE, FALSE
), race___5 = c(TRUE, TRUE, TRUE, TRUE, FALSE), race___6 = c(FALSE,
FALSE, FALSE, FALSE, TRUE), ethnicity = c(1L, 1L, 0L, 1L,
2L), interpreter_needed = c(0L, 0L, 1L, NA, 0L), demographics_complete = c(2L,
2L, 2L, 2L, 2L), health_complete = c(1L, 0L, 2L, 2L, 0L),
race_and_ethnicity_complete = c(2L, 0L, 2L, 2L, 2L)), row.names = c(NA,
-5L), class = c("tbl_df", "tbl", "data.frame"))
), mugshot = 22:26, race___123456 = c(FALSE, FALSE, FALSE,
FALSE, FALSE), ethnicity = c(1L, 1L, 0L, 1L, 2L), interpreter_needed = c(0L,
0L, 1L, NA, 0L), demographics_complete = c(2L, 2L, 2L, 2L,
2L), health_complete = c(1L, 0L, 2L, 2L, 0L), race_and_ethnicity_complete = c(2L,
0L, 2L, 2L, 2L)), row.names = c(NA, -5L), class = c("tbl_df",
"tbl", "data.frame"))
16 changes: 6 additions & 10 deletions inst/test-data/specific-redcapr/read-oneshot-eav/raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@ structure(list(record_id = 1:5, name_first = c("Nutmeg", "Tumtum",
comments = c("Character in a book, with some guessing", "A mouse character from a good book",
"completely made up", "This record doesn't have a DAG assigned\n\nSo call up Trudy on the telephone\nSend her a letter in the mail",
"Had a hand for trouble and a eye for cash\n\nHe had a gold watch chain and a black mustache"
), mugshot = c(197977L, 197978L, 197979L, 198002L, 198021L
), race___1 = c(FALSE, FALSE, FALSE, FALSE, TRUE), race___2 = c(FALSE,
FALSE, FALSE, TRUE, FALSE), race___3 = c(FALSE, TRUE, FALSE,
FALSE, FALSE), race___4 = c(FALSE, FALSE, TRUE, FALSE, FALSE
), race___5 = c(TRUE, TRUE, TRUE, TRUE, FALSE), race___6 = c(FALSE,
FALSE, FALSE, FALSE, TRUE), ethnicity = c(1L, 1L, 0L, 1L,
2L), interpreter_needed = c(0L, 0L, 1L, NA, 0L), demographics_complete = c(2L,
2L, 2L, 2L, 2L), health_complete = c(1L, 0L, 2L, 2L, 0L),
race_and_ethnicity_complete = c(2L, 0L, 2L, 2L, 2L)), row.names = c(NA,
-5L), class = c("tbl_df", "tbl", "data.frame"))
), mugshot = 22:26, race___123456 = c(FALSE, FALSE, FALSE,
FALSE, FALSE), ethnicity = c(1L, 1L, 0L, 1L, 2L), interpreter_needed = c(0L,
0L, 1L, NA, 0L), demographics_complete = c(2L, 2L, 2L, 2L,
2L), health_complete = c(1L, 0L, 2L, 2L, 0L), race_and_ethnicity_complete = c(2L,
0L, 2L, 2L, 2L)), row.names = c(NA, -5L), class = c("tbl_df",
"tbl", "data.frame"))
14 changes: 5 additions & 9 deletions inst/test-data/specific-redcapr/read-oneshot-eav/specify-forms.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@ structure(list(record_id = 1:5, name_first = c("Nutmeg", "Tumtum",
"[email protected]", "[email protected]", "[email protected]", "[email protected]"
), dob = c("2003-08-30", "2003-03-10", "1934-04-09", "1952-11-02",
"1955-04-15"), age = c(11L, 11L, 80L, 61L, 59L), sex = c(0L,
1L, 1L, 0L, 1L), race___1 = c(FALSE, FALSE, FALSE, FALSE, TRUE
), race___2 = c(FALSE, FALSE, FALSE, TRUE, FALSE), race___3 = c(FALSE,
TRUE, FALSE, FALSE, FALSE), race___4 = c(FALSE, FALSE, TRUE,
FALSE, FALSE), race___5 = c(TRUE, TRUE, TRUE, TRUE, FALSE), race___6 = c(FALSE,
FALSE, FALSE, FALSE, TRUE), ethnicity = c(1L, 1L, 0L, 1L, 2L),
interpreter_needed = c(0L, 0L, 1L, NA, 0L), demographics_complete = c(2L,
2L, 2L, 2L, 2L), race_and_ethnicity_complete = c(2L, 0L,
2L, 2L, 2L)), row.names = c(NA, -5L), class = c("tbl_df",
"tbl", "data.frame"))
1L, 1L, 0L, 1L), race___123456 = c(FALSE, FALSE, FALSE, FALSE,
FALSE), ethnicity = c(1L, 1L, 0L, 1L, 2L), interpreter_needed = c(0L,
0L, 1L, NA, 0L), demographics_complete = c(2L, 2L, 2L, 2L, 2L
), race_and_ethnicity_complete = c(2L, 0L, 2L, 2L, 2L)), row.names = c(NA,
-5L), class = c("tbl_df", "tbl", "data.frame"))

0 comments on commit a3c595a

Please sign in to comment.