Skip to content

Commit

Permalink
Sort snapshot results
Browse files Browse the repository at this point in the history
  • Loading branch information
nsjohnsen committed Apr 4, 2024
1 parent f0f18af commit 18a8d10
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 52 deletions.
104 changes: 52 additions & 52 deletions tests/testthat/_snaps/mild_ae_by_sex.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,56 @@
ep_stat[, .(stat_filter, endpoint_group_filter, stat_result_label,
stat_result_description, stat_result_qualifiers, stat_result_value)]
Output
stat_filter
<char>
1: TOTAL_ == "total" & TRT01A == "Placebo"
2: TOTAL_ == "total" & TRT01A == "Placebo"
3: TOTAL_ == "total" & TRT01A == "Xanomeline High Dose"
4: TOTAL_ == "total" & TRT01A == "Xanomeline High Dose"
5: SEX == "F" & TRT01A == "Placebo"
---
4274:
4275:
4276:
4277:
4278:
endpoint_group_filter
<char>
1: AESOC == "GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS" & AESEV == "MILD"
2: AESOC == "GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS" & AESEV == "MILD"
3: AESOC == "GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS" & AESEV == "MILD"
4: AESOC == "GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS" & AESEV == "MILD"
5: AESOC == "GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS" & AESEV == "MILD"
---
4274: AESOC == "SOCIAL CIRCUMSTANCES" & AESEV == "SEVERE"
4275: AESOC == "EAR AND LABYRINTH DISORDERS" & AESEV == "SEVERE"
4276: AESOC == "EAR AND LABYRINTH DISORDERS" & AESEV == "SEVERE"
4277: AESOC == "NEOPLASMS BENIGN, MALIGNANT AND UNSPECIFIED (INCL CYSTS AND POLYPS)" & AESEV == "SEVERE"
4278: AESOC == "NEOPLASMS BENIGN, MALIGNANT AND UNSPECIFIED (INCL CYSTS AND POLYPS)" & AESEV == "SEVERE"
stat_result_label stat_result_description
<char> <char>
1: N Number of subjects
2: E Number of events
3: N Number of subjects
4: E Number of events
5: N Number of subjects
---
4274: <NA> P-value interaction not conducted
4275: <NA> P-value interaction not conducted
4276: <NA> P-value interaction not conducted
4277: <NA> P-value interaction not conducted
4278: <NA> P-value interaction not conducted
stat_result_qualifiers stat_result_value
<char> <num>
1: <NA> 86
2: <NA> 36
3: <NA> 72
4: <NA> 75
5: <NA> 53
---
4274: <NA> NA
4275: <NA> NA
4276: <NA> NA
4277: <NA> NA
4278: <NA> NA
stat_filter
<char>
1: TOTAL_ == "total" & TRT01A == "Placebo"
2: TOTAL_ == "total" & TRT01A == "Placebo"
3: TOTAL_ == "total" & TRT01A == "Xanomeline High Dose"
4: TOTAL_ == "total" & TRT01A == "Xanomeline High Dose"
5: SEX == "F" & TRT01A == "Placebo"
---
17108: <NA>
17109: <NA>
17110: <NA>
17111: <NA>
17112: <NA>
endpoint_group_filter
<char>
1: AESOC == "GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS" & AESEV == "MILD"
2: AESOC == "GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS" & AESEV == "MILD"
3: AESOC == "GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS" & AESEV == "MILD"
4: AESOC == "GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS" & AESEV == "MILD"
5: AESOC == "GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS" & AESEV == "MILD"
---
17108: <NA>
17109: <NA>
17110: <NA>
17111: <NA>
17112: <NA>
stat_result_label stat_result_description stat_result_qualifiers
<char> <char> <char>
1: N Number of subjects <NA>
2: E Number of events <NA>
3: N Number of subjects <NA>
4: E Number of events <NA>
5: N Number of subjects <NA>
---
17108: <NA> <NA> <NA>
17109: <NA> <NA> <NA>
17110: <NA> <NA> <NA>
17111: <NA> <NA> <NA>
17112: <NA> <NA> <NA>
stat_result_value
<num>
1: 86
2: 36
3: 72
4: 75
5: 53
---
17108: NA
17109: NA
17110: NA
17111: NA
17112: NA

4 changes: 4 additions & 0 deletions tests/testthat/test-mild_ae_by_sex.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ test_that("Complex pipeline runs without errors",
# EXPECT ------------------------------------------------------------------
x <- targets::tar_meta() |> data.table::as.data.table()
targets::tar_load(ep_stat)
ep_stat <- ep_stat[order(c(endpoint_id,
stat_result_id,
stat_result_label,
stat_result_description)), ]
expect_true(all(is.na(x$error)))
expect_snapshot(ep_stat[, .(stat_filter,
endpoint_group_filter,
Expand Down

0 comments on commit 18a8d10

Please sign in to comment.