Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update table snapshots #80

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ License: Apache License 2.0 | file LICENSE
URL: https://github.com/insightsengineering/scda.test/
BugReports: https://github.com/insightsengineering/scda.test/issues
Depends:
formatters (>= 0.5.4.9002),
formatters (>= 0.5.5),
R (>= 4.2),
rlistings (>= 0.2.6.9005),
rtables (>= 0.6.5.9004),
tern (>= 0.9.2.9001)
rlistings (>= 0.2.7),
rtables (>= 0.6.6),
tern (>= 0.9.3)
Imports:
scda (>= 0.1.6.9012),
scda.2022 (>= 0.1.5.9002)
scda (>= 0.1.6.9013),
scda.2022 (>= 0.1.5.9003)
Suggests:
broom,
checkmate,
Expand Down
15 changes: 6 additions & 9 deletions tests/testthat/_snaps/table_lbt11.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@
Median NA NA 728.0
95% CI NA (724.0, NA) NA
25% and 75%-ile 618.0, NA 724.0, NA 728.0, 728.0
Range 1.0 to 731.0 {1} 1.0 to 728.0 {2} 1.0 to 728.0 {3}
Range 1.0 to 731.0 {1} 1.0 to 728.0 {1} 1.0 to 728.0 {2}
Unstratified Analysis
p-value (log-rank) 0.0295 0.1687
Hazard Ratio 0.43 0.58
95% CI (0.19, 0.94) (0.26, 1.27)
———————————————————————————————————————————————————————————————————————————————————————

{1} - Censored observations: range minimum & maximum
{2} - Censored observations: range minimum & maximum
{3} - Censored observation: range minimum
{2} - Censored observation: range minimum
———————————————————————————————————————————————————————————————————————————————————————


Expand All @@ -39,12 +38,11 @@
Median NA NA 728.0
95% CI NA (724.0, NA) NA
25% and 75%-ile 618.0, NA 724.0, NA 728.0, 728.0
Range 1.0 to 731.0 {1} 1.0 to 728.0 {2} 1.0 to 728.0 {3}
Range 1.0 to 731.0 {1} 1.0 to 728.0 {1} 1.0 to 728.0 {2}
———————————————————————————————————————————————————————————————————————————————————————

{1} - Censored observations: range minimum & maximum
{2} - Censored observations: range minimum & maximum
{3} - Censored observation: range minimum
{2} - Censored observation: range minimum
———————————————————————————————————————————————————————————————————————————————————————


Expand All @@ -62,7 +60,7 @@
Median NA NA 728.0
95% CI NA (724.0, NA) NA
25% and 75%-ile 618.0, NA 724.0, NA 728.0, 728.0
Range 1.0 to 731.0 {1} 1.0 to 728.0 {2} 1.0 to 728.0 {3}
Range 1.0 to 731.0 {1} 1.0 to 728.0 {1} 1.0 to 728.0 {2}
Unstratified Analysis
p-value (log-rank) 0.0295 0.1687
Hazard Ratio 0.43 0.58
Expand All @@ -74,8 +72,7 @@
———————————————————————————————————————————————————————————————————————————————————————

{1} - Censored observations: range minimum & maximum
{2} - Censored observations: range minimum & maximum
{3} - Censored observation: range minimum
{2} - Censored observation: range minimum
———————————————————————————————————————————————————————————————————————————————————————


12 changes: 3 additions & 9 deletions tests/testthat/_snaps/table_lbt11_bl.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@
Median NA NA 721.0
95% CI NA (681.0, NA) (691.0, NA)
25% and 75%-ile 608.0, NA 558.0, NA 644.0, NA
Range 1.0 to 728.0 {1} 1.0 to 726.0 {2} 1.0 to 724.0 {3}
Range 1.0 to 728.0 {1} 1.0 to 726.0 {1} 1.0 to 724.0 {1}
Unstratified Analysis
p-value (log-rank) 0.5013 0.6413
Hazard Ratio 1.27 0.84
95% CI (0.63, 2.56) (0.40, 1.75)
———————————————————————————————————————————————————————————————————————————————————————

{1} - Censored observations: range minimum & maximum
{2} - Censored observations: range minimum & maximum
{3} - Censored observations: range minimum & maximum
———————————————————————————————————————————————————————————————————————————————————————


Expand All @@ -39,12 +37,10 @@
Median NA NA 721.0
95% CI NA (681.0, NA) (691.0, NA)
25% and 75%-ile 608.0, NA 558.0, NA 644.0, NA
Range 1.0 to 728.0 {1} 1.0 to 726.0 {2} 1.0 to 724.0 {3}
Range 1.0 to 728.0 {1} 1.0 to 726.0 {1} 1.0 to 724.0 {1}
———————————————————————————————————————————————————————————————————————————————————————

{1} - Censored observations: range minimum & maximum
{2} - Censored observations: range minimum & maximum
{3} - Censored observations: range minimum & maximum
———————————————————————————————————————————————————————————————————————————————————————


Expand All @@ -62,7 +58,7 @@
Median NA NA 721.0
95% CI NA (681.0, NA) (691.0, NA)
25% and 75%-ile 608.0, NA 558.0, NA 644.0, NA
Range 1.0 to 728.0 {1} 1.0 to 726.0 {2} 1.0 to 724.0 {3}
Range 1.0 to 728.0 {1} 1.0 to 726.0 {1} 1.0 to 724.0 {1}
Unstratified Analysis
p-value (log-rank) 0.5013 0.6413
Hazard Ratio 1.27 0.84
Expand All @@ -74,8 +70,6 @@
———————————————————————————————————————————————————————————————————————————————————————

{1} - Censored observations: range minimum & maximum
{2} - Censored observations: range minimum & maximum
{3} - Censored observations: range minimum & maximum
———————————————————————————————————————————————————————————————————————————————————————


28 changes: 7 additions & 21 deletions tests/testthat/_snaps/table_ttet01.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Median NA NA 9.4
95% CI (9.3, NA) (9.4, NA) (7.6, NA)
25% and 75%-ile 5.6, NA 5.6, NA 5.0, NA
Range 0.5 to 16.4 {1} 0.9 to 16.3 {2} 0.5 to 16.3 {3}
Range 0.5 to 16.4 {1} 0.9 to 16.3 {1} 0.5 to 16.3 {1}
Unstratified Analysis
p-value (log-rank) 0.9998 0.1541
Hazard Ratio 1.00 1.29
Expand All @@ -36,8 +36,6 @@
—————————————————————————————————————————————————————————————————————————————————————

{1} - Censored observation: range maximum
{2} - Censored observation: range maximum
{3} - Censored observation: range maximum
—————————————————————————————————————————————————————————————————————————————————————


Expand All @@ -57,7 +55,7 @@
Median NA 9.4 NA
95% CI (9.3, NA) (7.6, NA) (9.4, NA)
25% and 75%-ile 5.6, NA 5.0, NA 5.6, NA
Range 0.5 to 16.4 {1} 0.5 to 16.3 {2} 0.9 to 16.3 {3}
Range 0.5 to 16.4 {1} 0.5 to 16.3 {1} 0.9 to 16.3 {1}
Unstratified Analysis
p-value (log-rank) 0.9998 0.1480
Hazard Ratio 1.00 1.29
Expand All @@ -79,8 +77,6 @@
—————————————————————————————————————————————————————————————————————————————————————

{1} - Censored observation: range maximum
{2} - Censored observation: range maximum
{3} - Censored observation: range maximum
—————————————————————————————————————————————————————————————————————————————————————


Expand All @@ -98,7 +94,7 @@
Median NA NA 9.4
95% CI (9.3, NA) (9.4, NA) (7.6, NA)
25% and 75%-ile 5.6, NA 5.6, NA 5.0, NA
Range 0.5 to 16.4 {1} 0.9 to 16.3 {2} 0.5 to 16.3 {3}
Range 0.5 to 16.4 {1} 0.9 to 16.3 {1} 0.5 to 16.3 {1}
Unstratified Analysis
p-value (log-rank) 0.9998 0.1541
Hazard Ratio 1.00 1.29
Expand All @@ -110,8 +106,6 @@
——————————————————————————————————————————————————————————————————————————————————

{1} - Censored observation: range maximum
{2} - Censored observation: range maximum
{3} - Censored observation: range maximum
——————————————————————————————————————————————————————————————————————————————————


Expand All @@ -131,7 +125,7 @@
Median NA NA 9.4
90% CI (9.6, NA) (9.6, NA) (7.7, NA)
25% and 75%-ile 5.6, NA 5.6, NA 5.0, NA
Range 0.5 to 16.4 {1} 0.9 to 16.3 {2} 0.5 to 16.3 {3}
Range 0.5 to 16.4 {1} 0.9 to 16.3 {1} 0.5 to 16.3 {1}
Unstratified Analysis
p-value (log-rank) 0.9998 0.1541
Hazard Ratio 1.00 1.29
Expand All @@ -146,8 +140,6 @@
———————————————————————————————————————————————————————————————————————————————————

{1} - Censored observation: range maximum
{2} - Censored observation: range maximum
{3} - Censored observation: range maximum
———————————————————————————————————————————————————————————————————————————————————


Expand All @@ -167,7 +159,7 @@
Median NA NA 9.4
95% CI (9.3, NA) (9.4, NA) (7.6, NA)
25% and 75%-ile 5.6, NA 5.6, NA 5.0, NA
Range 0.5 to 16.4 {1} 0.9 to 16.3 {2} 0.5 to 16.3 {3}
Range 0.5 to 16.4 {1} 0.9 to 16.3 {1} 0.5 to 16.3 {1}
Unstratified Analysis
p-value (log-rank) 0.9998 0.1541
Hazard Ratio 1.00 1.29
Expand All @@ -186,8 +178,6 @@
—————————————————————————————————————————————————————————————————————————————————————

{1} - Censored observation: range maximum
{2} - Censored observation: range maximum
{3} - Censored observation: range maximum
—————————————————————————————————————————————————————————————————————————————————————


Expand All @@ -207,7 +197,7 @@
Median NA NA 9.4
95% CI (9.3, NA) (9.4, NA) (7.6, NA)
25% and 75%-ile 5.6, NA 5.6, NA 5.0, NA
Range 0.5 to 16.4 {1} 0.9 to 16.3 {2} 0.5 to 16.3 {3}
Range 0.5 to 16.4 {1} 0.9 to 16.3 {1} 0.5 to 16.3 {1}
Unstratified Analysis
p-value (log-rank) 0.9998 0.1541
Hazard Ratio 1.00 1.29
Expand All @@ -222,8 +212,6 @@
—————————————————————————————————————————————————————————————————————————————————————

{1} - Censored observation: range maximum
{2} - Censored observation: range maximum
{3} - Censored observation: range maximum
—————————————————————————————————————————————————————————————————————————————————————


Expand All @@ -243,7 +231,7 @@
Median NA NA 9.4
95% CI (9.3, NA) (9.4, NA) (7.6, NA)
25% and 75%-ile 5.6, NA 5.6, NA 5.0, NA
Range 0.5 to 16.4 {1} 0.9 to 16.3 {2} 0.5 to 16.3 {3}
Range 0.5 to 16.4 {1} 0.9 to 16.3 {1} 0.5 to 16.3 {1}
Unstratified Analysis
p-value (log-rank) 0.9998 0.1541
p-value (wald) 0.9998 0.1552
Expand All @@ -260,8 +248,6 @@
—————————————————————————————————————————————————————————————————————————————————————

{1} - Censored observation: range maximum
{2} - Censored observation: range maximum
{3} - Censored observation: range maximum
—————————————————————————————————————————————————————————————————————————————————————


4 changes: 2 additions & 2 deletions tests/testthat/test-table_aet02.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ testthat::test_that("AET02 variant 1 is produced correctly", {
# Testing pagination with not repeated Total number of patients
pag_result <- paginate_table(result, cpp = 75) # std is 70 which fails
testthat::expect_identical(
to_string_matrix(pag_result[[1]])[3, 1],
to_string_matrix(pag_result[[1]], with_spaces = FALSE)[3, 1],
"Total number of patients with at least one adverse event"
)
testthat::expect_identical(to_string_matrix(pag_result[[2]])[5, 1], "cl A.1")
testthat::expect_identical(to_string_matrix(pag_result[[2]], with_spaces = FALSE)[5, 1], "cl A.1")
})

testthat::test_that("AET02 variant 2 is produced correctly", {
Expand Down
Loading