From 6f3777682d016cad9aee768267579a6da2765180 Mon Sep 17 00:00:00 2001 From: Daniel Sjoberg Date: Tue, 28 Jun 2022 21:07:06 -0400 Subject: [PATCH 1/7] Update visr.R --- R/visr.R | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/R/visr.R b/R/visr.R index 8a10fa02..511587e2 100644 --- a/R/visr.R +++ b/R/visr.R @@ -271,14 +271,16 @@ visr.survfit <- function(x = NULL, )) + ggplot2::geom_step(ggplot2::aes(y = est, col = strata)) + ggplot2::scale_x_continuous( - breaks = x_ticks, - limits = c(min(x_ticks), max(x_ticks)) + breaks = x_ticks ) + ggplot2::xlab(x_label) + ggplot2::scale_y_continuous( breaks = y_ticks, - labels = yscaleFUN, - limits = c(min(y_ticks), max(y_ticks)) + labels = yscaleFUN + ) + + ggplot2::coord_cartesian( + xlim = c(min(x_ticks), max(x_ticks)), + ylim = c(min(y_ticks), max(y_ticks)) ) + ggplot2::ylab(y_label) + ggplot2::labs(color = .construct_strata_label(x)) + From 7b5470d6c116b550ea80e4174dd2de30737699f1 Mon Sep 17 00:00:00 2001 From: Daniel Sjoberg Date: Tue, 28 Jun 2022 21:20:44 -0400 Subject: [PATCH 2/7] add rprofile --- .Rprofile | 6 ++++++ .gitignore | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .Rprofile diff --git a/.Rprofile b/.Rprofile new file mode 100644 index 00000000..3192a7c7 --- /dev/null +++ b/.Rprofile @@ -0,0 +1,6 @@ +# this sets the dev folder in the .libPath +# if user has not set up dev mode, nothing will happen +tryCatch( + devtools::dev_mode(on = TRUE), + error = function(e) invisible() +) diff --git a/.gitignore b/.gitignore index 9c54d718..16ff1ecf 100644 --- a/.gitignore +++ b/.gitignore @@ -38,4 +38,3 @@ inst/doc README.html docs/ tests/testthat/_snaps/ -.Rprofile From 3f80d967eb157c41962d30c318619a035f82af5b Mon Sep 17 00:00:00 2001 From: Daniel Sjoberg Date: Tue, 28 Jun 2022 21:35:28 -0400 Subject: [PATCH 3/7] increment version number --- DESCRIPTION | 2 +- NEWS.md | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index be38991f..ea215f7b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: visR Title: Clinical Graphs and Tables Adhering to Graphical Principles -Version: 0.3.0.9002 +Version: 0.3.0.9003 Authors@R: c( person("Mark", "Baillie", , "bailliem@gmail.com", role = c("aut", "cre", "cph")), person("Diego", "Saldana", , "diego.saldana@roche.com", role = "aut"), diff --git a/NEWS.md b/NEWS.md index 552ae951..db2ef76a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,10 +1,9 @@ # visR (development version) -### Bug Fixes +* We now zoom in on figure (e.g. Kaplan-Meier figure) with `ggplot2::coord_cartesean()` instead of using `xlim=` and `ylim=`. The latter first remove data outside the limits, then construct the line. Zooming in constructs the full line, then zooms into the limits. This is useful because the risktable often reports estimates near the end of a KM figure, but the line is cutoff and not shown at the last timepoint. (#402) * README update to contributor listing. (#435) - # visR 0.3.0 ### New functions From 8f16ce2778df3fbf0c0bcc76c8e4db56c1d1dfdb Mon Sep 17 00:00:00 2001 From: Daniel Sjoberg Date: Tue, 28 Jun 2022 21:37:29 -0400 Subject: [PATCH 4/7] Update visr.R --- R/visr.R | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/R/visr.R b/R/visr.R index 511587e2..12484fb2 100644 --- a/R/visr.R +++ b/R/visr.R @@ -535,14 +535,16 @@ visr.tidycuminc <- function(x = NULL, )) + ggplot2::geom_step(ggplot2::aes(y = est, col = strata)) + ggplot2::scale_x_continuous( - breaks = x_ticks, - limits = c(min(x_ticks), max(x_ticks)) + breaks = x_ticks ) + ggplot2::xlab(x_label) + ggplot2::scale_y_continuous( breaks = y_ticks, - labels = yscaleFUN, - limits = c(min(y_ticks), max(y_ticks)) + labels = yscaleFUN + ) + + ggplot2::coord_cartesian( + xlim = c(min(x_ticks), max(x_ticks)), + ylim = c(min(y_ticks), max(y_ticks)) ) + ggplot2::ylab(y_label) + ggplot2::labs(color = .construct_strata_label(x)) + From 5bc2d77cc1a58e8cd67e15ed117df591122904a3 Mon Sep 17 00:00:00 2001 From: Daniel Sjoberg Date: Thu, 30 Jun 2022 22:10:14 -0400 Subject: [PATCH 5/7] updated news --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index db2ef76a..b1d84efd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ # visR (development version) -* We now zoom in on figure (e.g. Kaplan-Meier figure) with `ggplot2::coord_cartesean()` instead of using `xlim=` and `ylim=`. The latter first remove data outside the limits, then construct the line. Zooming in constructs the full line, then zooms into the limits. This is useful because the risktable often reports estimates near the end of a KM figure, but the line is cutoff and not shown at the last timepoint. (#402) +* We now zoom in on a figure (e.g. Kaplan-Meier figure) with `ggplot2::coord_cartesian()` instead of using `scale_x_continuous(limits=)` and `scale_y_continuous(limits=)`. The latter first removes data outside the limits, then constructs the line. Zooming constructs the full line, then zooms into the limits. This is useful because the risktable often reports estimates near the end of a KM figure, but the line is cutoff and not shown at the last time point. (#402) * README update to contributor listing. (#435) From ce1e35e0768232e15e9232f97b91656849000b15 Mon Sep 17 00:00:00 2001 From: Daniel Sjoberg Date: Mon, 4 Jul 2022 10:13:49 -0400 Subject: [PATCH 6/7] adding snapshot testing --- .gitignore | 1 - tests/testthat/Rplots.pdf | Bin 202374 -> 202375 bytes ...error-when-default-parameters-are-used.svg | 111 ++++++++ .../add_CI/add-ci-t1-3-style-ribbon.svg | 118 ++++++++ .../_snaps/add_CI/add-ci-t1-3-style-step.svg | 118 ++++++++ .../_snaps/add_CI/add-ci-t1-4-linetype-0.svg | 114 ++++++++ .../_snaps/add_CI/add-ci-t1-4-linetype-1.svg | 118 ++++++++ .../_snaps/add_CI/add-ci-t1-4-linetype-2.svg | 118 ++++++++ .../_snaps/add_CI/add-ci-t1-4-linetype-3.svg | 118 ++++++++ .../_snaps/add_CI/add-ci-t1-4-linetype-4.svg | 118 ++++++++ .../_snaps/add_CI/add-ci-t1-4-linetype-5.svg | 118 ++++++++ .../_snaps/add_CI/add-ci-t1-4-linetype-6.svg | 118 ++++++++ .../add_CI/add-ci-t1-4-linetype-blank.svg | 114 ++++++++ .../add_CI/add-ci-t1-4-linetype-dashed.svg | 118 ++++++++ .../add_CI/add-ci-t1-4-linetype-dotdash.svg | 118 ++++++++ .../add_CI/add-ci-t1-4-linetype-dotted.svg | 118 ++++++++ .../add_CI/add-ci-t1-4-linetype-longdash.svg | 118 ++++++++ .../add_CI/add-ci-t1-4-linetype-solid.svg | 118 ++++++++ .../add_CI/add-ci-t1-4-linetype-twodash.svg | 118 ++++++++ .../_snaps/add_CI/add-ci-t1-alpha-0.svg | 118 ++++++++ .../_snaps/add_CI/add-ci-t1-alpha-05.svg | 118 ++++++++ .../_snaps/add_CI/add-ci-t1-alpha-1.svg | 118 ++++++++ .../_snaps/add_CI/add-ci-t2-1-one-strata.svg | 111 ++++++++ .../_snaps/add_CI/add-ci-t2-2-10strata.svg | 166 +++++++++++ .../_snaps/add_CI/add-ci-t2-2-20strata.svg | 226 +++++++++++++++ .../_snaps/add_CI/add-ci-t2-2-5strata.svg | 136 +++++++++ .../add_CNSR/add-cnsr-t1-1-one-strata.svg | 226 +++++++++++++++ .../_snaps/add_CNSR/add-cnsr-t1-2-trtp.svg | 263 ++++++++++++++++++ .../add-cnsr-t1-3-shape-empty-string.svg | 112 ++++++++ .../add-cnsr-t1-4-shape-valid-numerical.svg | 182 ++++++++++++ .../add-cnsr-t1-5-shape-atomic-string.svg | 182 ++++++++++++ .../add-cnsr-t1-7-size-negative-numerical.svg | 252 +++++++++++++++++ .../add-cnsr-t1-7-size-positive-numerical.svg | 252 +++++++++++++++++ .../add_CNSR/add-cnsr-t1-7-size-zero.svg | 252 +++++++++++++++++ ...ht-t2-1-no-error-when-strata-is-string.svg | 115 ++++++++ ...-4-no-error-when-strata-is-string-list.svg | 115 ++++++++ ...2-4-no-error-when-strata-is-string-vec.svg | 115 ++++++++ .../add-highlight-t3-4-bg-alpha-is-0-4.svg | 115 ++++++++ .../add-highlight-t3-4-bg-alpha-is-0.svg | 115 ++++++++ .../add-highlight-t3-4-bg-alpha-is-1.svg | 115 ++++++++ ...-risktable-t2-3-aligned-when-no-legend.svg | 214 ++++++++++++++ ...add-risktable-t2-4-aligned-when-legend.svg | 222 +++++++++++++++ ...s-on-the-heights-of-the-table-and-plot.svg | 222 +++++++++++++++ ...ror-when-the-default-rowgutter-is-used.svg | 222 +++++++++++++++ ...-3-yaxis-labels-aligned-when-no-legend.svg | 211 ++++++++++++++ ...-t2-4-yaxis-labels-aligned-when-legend.svg | 225 +++++++++++++++ .../_snaps/visr_survfit/plot-zoom.svg | 149 ++++++++++ tests/testthat/test-visr_survfit.R | 18 ++ 48 files changed, 6878 insertions(+), 1 deletion(-) create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-1-no-error-when-default-parameters-are-used.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-3-style-ribbon.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-3-style-step.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-0.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-1.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-2.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-3.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-4.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-5.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-6.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-blank.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-dashed.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-dotdash.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-dotted.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-longdash.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-solid.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-twodash.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-alpha-0.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-alpha-05.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t1-alpha-1.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t2-1-one-strata.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t2-2-10strata.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t2-2-20strata.svg create mode 100644 tests/testthat/_snaps/add_CI/add-ci-t2-2-5strata.svg create mode 100644 tests/testthat/_snaps/add_CNSR/add-cnsr-t1-1-one-strata.svg create mode 100644 tests/testthat/_snaps/add_CNSR/add-cnsr-t1-2-trtp.svg create mode 100644 tests/testthat/_snaps/add_CNSR/add-cnsr-t1-3-shape-empty-string.svg create mode 100644 tests/testthat/_snaps/add_CNSR/add-cnsr-t1-4-shape-valid-numerical.svg create mode 100644 tests/testthat/_snaps/add_CNSR/add-cnsr-t1-5-shape-atomic-string.svg create mode 100644 tests/testthat/_snaps/add_CNSR/add-cnsr-t1-7-size-negative-numerical.svg create mode 100644 tests/testthat/_snaps/add_CNSR/add-cnsr-t1-7-size-positive-numerical.svg create mode 100644 tests/testthat/_snaps/add_CNSR/add-cnsr-t1-7-size-zero.svg create mode 100644 tests/testthat/_snaps/add_highlight/add-highlight-t2-1-no-error-when-strata-is-string.svg create mode 100644 tests/testthat/_snaps/add_highlight/add-highlight-t2-4-no-error-when-strata-is-string-list.svg create mode 100644 tests/testthat/_snaps/add_highlight/add-highlight-t2-4-no-error-when-strata-is-string-vec.svg create mode 100644 tests/testthat/_snaps/add_highlight/add-highlight-t3-4-bg-alpha-is-0-4.svg create mode 100644 tests/testthat/_snaps/add_highlight/add-highlight-t3-4-bg-alpha-is-0.svg create mode 100644 tests/testthat/_snaps/add_highlight/add-highlight-t3-4-bg-alpha-is-1.svg create mode 100644 tests/testthat/_snaps/add_risktable/add-risktable-t2-3-aligned-when-no-legend.svg create mode 100644 tests/testthat/_snaps/add_risktable/add-risktable-t2-4-aligned-when-legend.svg create mode 100644 tests/testthat/_snaps/add_risktable/t4-6-changing-rowgutter-affects-on-the-heights-of-the-table-and-plot.svg create mode 100644 tests/testthat/_snaps/add_risktable/t4-no-error-when-the-default-rowgutter-is-used.svg create mode 100644 tests/testthat/_snaps/utils_visR/utils-visr-t2-3-yaxis-labels-aligned-when-no-legend.svg create mode 100644 tests/testthat/_snaps/utils_visR/utils-visr-t2-4-yaxis-labels-aligned-when-legend.svg create mode 100644 tests/testthat/_snaps/visr_survfit/plot-zoom.svg diff --git a/.gitignore b/.gitignore index 16ff1ecf..042bee15 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,3 @@ vignettes/*.pdf inst/doc README.html docs/ -tests/testthat/_snaps/ diff --git a/tests/testthat/Rplots.pdf b/tests/testthat/Rplots.pdf index 7d60e27e6361896842a9a686937787ef0ebe4a49..8d7ad79a86703e327c69fe95c4f2a0cc443d6673 100644 GIT binary patch delta 208 zcmZo$%hSG=XM&lkxq*qHfq|K^ktUbEZ+?nPVo9okhKrSvfsv5`TyA2t9;4yJuE!h; zyLK{c;E>wWT*}y9$_TvF1y6*DrJtmR(1{U0kc6R(|_fr0@D zDC8+{foMZZ3u7}Q3^5aP6AUp^1M}^6!px7EMA6h685kN_nol^a} E0Hg;nrvLx| delta 196 zcmZo)%hR@&XM&lknW3?PrK!2Gi6)o6Z+?nPVo9okhKrSvfsv5`TyA2t9;3m;uE!h) z+jcVO7YnvDmom1OGJ-JE_EJXXV3z3u%*-C!1=*NC@YtDJDj0x(LY@K_h&HseFg7#9 r5Hm41#t<_#Fxze~%>0;16ivO6fuWJ5*>rO;W)BV%E>%@me>W}wXaz1U diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-1-no-error-when-default-parameters-are-used.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-1-no-error-when-default-parameters-are-used.svg new file mode 100644 index 00000000..4abf5dd1 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-1-no-error-when-default-parameters-are-used.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + + +Overall +add_CI_T1_1_no_error_when_default_parameters_are_used + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-3-style-ribbon.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-3-style-ribbon.svg new file mode 100644 index 00000000..979604d4 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-3-style-ribbon.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CI_T1_3_style_ribbon + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-3-style-step.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-3-style-step.svg new file mode 100644 index 00000000..75017ed1 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-3-style-step.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CI_T1_3_style_step + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-0.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-0.svg new file mode 100644 index 00000000..020bbfc9 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-0.svg @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CI_T1_4_linetype_0 + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-1.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-1.svg new file mode 100644 index 00000000..4e56c585 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-1.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CI_T1_4_linetype_1 + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-2.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-2.svg new file mode 100644 index 00000000..0e76dc8a --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-2.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CI_T1_4_linetype_2 + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-3.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-3.svg new file mode 100644 index 00000000..9e6fe380 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-3.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CI_T1_4_linetype_3 + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-4.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-4.svg new file mode 100644 index 00000000..2fbd9058 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-4.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CI_T1_4_linetype_4 + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-5.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-5.svg new file mode 100644 index 00000000..cb27b7d5 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-5.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CI_T1_4_linetype_5 + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-6.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-6.svg new file mode 100644 index 00000000..193a52b5 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-6.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CI_T1_4_linetype_6 + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-blank.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-blank.svg new file mode 100644 index 00000000..72656e43 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-blank.svg @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CI_T1_4_linetype_blank + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-dashed.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-dashed.svg new file mode 100644 index 00000000..35330d66 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-dashed.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CI_T1_4_linetype_dashed + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-dotdash.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-dotdash.svg new file mode 100644 index 00000000..16d58f60 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-dotdash.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CI_T1_4_linetype_dotdash + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-dotted.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-dotted.svg new file mode 100644 index 00000000..11f1f710 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-dotted.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CI_T1_4_linetype_dotted + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-longdash.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-longdash.svg new file mode 100644 index 00000000..3b4010b7 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-longdash.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CI_T1_4_linetype_longdash + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-solid.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-solid.svg new file mode 100644 index 00000000..476cd7d6 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-solid.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CI_T1_4_linetype_solid + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-twodash.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-twodash.svg new file mode 100644 index 00000000..efe9130f --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-4-linetype-twodash.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CI_T1_4_linetype_twodash + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-alpha-0.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-alpha-0.svg new file mode 100644 index 00000000..530f3bd9 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-alpha-0.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CI_T1_alpha_0 + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-alpha-05.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-alpha-05.svg new file mode 100644 index 00000000..7f5ace26 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-alpha-05.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CI_T1_alpha_05 + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t1-alpha-1.svg b/tests/testthat/_snaps/add_CI/add-ci-t1-alpha-1.svg new file mode 100644 index 00000000..31c2581c --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t1-alpha-1.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CI_T1_alpha_1 + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t2-1-one-strata.svg b/tests/testthat/_snaps/add_CI/add-ci-t2-1-one-strata.svg new file mode 100644 index 00000000..2cfc9e05 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t2-1-one-strata.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + + +Overall +add_CI_T2_1_one_strata + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t2-2-10strata.svg b/tests/testthat/_snaps/add_CI/add-ci-t2-2-10strata.svg new file mode 100644 index 00000000..7c365652 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t2-2-10strata.svg @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +TRTDUR + + + + + + + + + + +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +add_CI_T2_2_10strata + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t2-2-20strata.svg b/tests/testthat/_snaps/add_CI/add-ci-t2-2-20strata.svg new file mode 100644 index 00000000..68f289f3 --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t2-2-20strata.svg @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +TRTDUR + + + + + + + + + + + + + + + + + + + + +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +add_CI_T2_2_20strata + + diff --git a/tests/testthat/_snaps/add_CI/add-ci-t2-2-5strata.svg b/tests/testthat/_snaps/add_CI/add-ci-t2-2-5strata.svg new file mode 100644 index 00000000..f5d355da --- /dev/null +++ b/tests/testthat/_snaps/add_CI/add-ci-t2-2-5strata.svg @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +TRTDUR + + + + + +1 +2 +3 +4 +5 +add_CI_T2_2_5strata + + diff --git a/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-1-one-strata.svg b/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-1-one-strata.svg new file mode 100644 index 00000000..84a7a150 --- /dev/null +++ b/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-1-one-strata.svg @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + + +Overall +add_CNSR_T1_1_one_strata + + diff --git a/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-2-trtp.svg b/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-2-trtp.svg new file mode 100644 index 00000000..c3d834fe --- /dev/null +++ b/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-2-trtp.svg @@ -0,0 +1,263 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Planned Treatment + + + +Placebo +Xanomeline High Dose +Xanomeline Low Dose +add_CNSR_T1_2_TRTP + + diff --git a/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-3-shape-empty-string.svg b/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-3-shape-empty-string.svg new file mode 100644 index 00000000..392e1a0e --- /dev/null +++ b/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-3-shape-empty-string.svg @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CNSR_T1_3_shape_empty_string + + diff --git a/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-4-shape-valid-numerical.svg b/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-4-shape-valid-numerical.svg new file mode 100644 index 00000000..a6e34012 --- /dev/null +++ b/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-4-shape-valid-numerical.svg @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CNSR_T1_4_shape_valid_numerical + + diff --git a/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-5-shape-atomic-string.svg b/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-5-shape-atomic-string.svg new file mode 100644 index 00000000..1c679746 --- /dev/null +++ b/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-5-shape-atomic-string.svg @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ +µ + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CNSR_T1_5_shape_atomic_string + + diff --git a/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-7-size-negative-numerical.svg b/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-7-size-negative-numerical.svg new file mode 100644 index 00000000..89918b11 --- /dev/null +++ b/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-7-size-negative-numerical.svg @@ -0,0 +1,252 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CNSR_T1_7_size_negative_numerical + + diff --git a/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-7-size-positive-numerical.svg b/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-7-size-positive-numerical.svg new file mode 100644 index 00000000..a0a94b2c --- /dev/null +++ b/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-7-size-positive-numerical.svg @@ -0,0 +1,252 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CNSR_T1_7_size_positive_numerical + + diff --git a/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-7-size-zero.svg b/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-7-size-zero.svg new file mode 100644 index 00000000..c99cefd7 --- /dev/null +++ b/tests/testthat/_snaps/add_CNSR/add-cnsr-t1-7-size-zero.svg @@ -0,0 +1,252 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex + + +F +M +add_CNSR_T1_7_size_zero + + diff --git a/tests/testthat/_snaps/add_highlight/add-highlight-t2-1-no-error-when-strata-is-string.svg b/tests/testthat/_snaps/add_highlight/add-highlight-t2-1-no-error-when-strata-is-string.svg new file mode 100644 index 00000000..6d0d1d7f --- /dev/null +++ b/tests/testthat/_snaps/add_highlight/add-highlight-t2-1-no-error-when-strata-is-string.svg @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Planned Treatment + + + +Placebo +Xanomeline High Dose +Xanomeline Low Dose +add_highlight_T2_1_no_error_when_strata_is_string + + diff --git a/tests/testthat/_snaps/add_highlight/add-highlight-t2-4-no-error-when-strata-is-string-list.svg b/tests/testthat/_snaps/add_highlight/add-highlight-t2-4-no-error-when-strata-is-string-list.svg new file mode 100644 index 00000000..613d68e8 --- /dev/null +++ b/tests/testthat/_snaps/add_highlight/add-highlight-t2-4-no-error-when-strata-is-string-list.svg @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Planned Treatment + + + +Placebo +Xanomeline High Dose +Xanomeline Low Dose +add_highlight_T2_4_no_error_when_strata_is_string_list + + diff --git a/tests/testthat/_snaps/add_highlight/add-highlight-t2-4-no-error-when-strata-is-string-vec.svg b/tests/testthat/_snaps/add_highlight/add-highlight-t2-4-no-error-when-strata-is-string-vec.svg new file mode 100644 index 00000000..a733fef7 --- /dev/null +++ b/tests/testthat/_snaps/add_highlight/add-highlight-t2-4-no-error-when-strata-is-string-vec.svg @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Planned Treatment + + + +Placebo +Xanomeline High Dose +Xanomeline Low Dose +add_highlight_T2_4_no_error_when_strata_is_string_vec + + diff --git a/tests/testthat/_snaps/add_highlight/add-highlight-t3-4-bg-alpha-is-0-4.svg b/tests/testthat/_snaps/add_highlight/add-highlight-t3-4-bg-alpha-is-0-4.svg new file mode 100644 index 00000000..8dc21bc2 --- /dev/null +++ b/tests/testthat/_snaps/add_highlight/add-highlight-t3-4-bg-alpha-is-0-4.svg @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Planned Treatment + + + +Placebo +Xanomeline High Dose +Xanomeline Low Dose +add_highlight_T3_4_bg_alpha_is_0_4 + + diff --git a/tests/testthat/_snaps/add_highlight/add-highlight-t3-4-bg-alpha-is-0.svg b/tests/testthat/_snaps/add_highlight/add-highlight-t3-4-bg-alpha-is-0.svg new file mode 100644 index 00000000..2aebbff3 --- /dev/null +++ b/tests/testthat/_snaps/add_highlight/add-highlight-t3-4-bg-alpha-is-0.svg @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Planned Treatment + + + +Placebo +Xanomeline High Dose +Xanomeline Low Dose +add_highlight_T3_4_bg_alpha_is_0 + + diff --git a/tests/testthat/_snaps/add_highlight/add-highlight-t3-4-bg-alpha-is-1.svg b/tests/testthat/_snaps/add_highlight/add-highlight-t3-4-bg-alpha-is-1.svg new file mode 100644 index 00000000..bd6989cd --- /dev/null +++ b/tests/testthat/_snaps/add_highlight/add-highlight-t3-4-bg-alpha-is-1.svg @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Planned Treatment + + + +Placebo +Xanomeline High Dose +Xanomeline Low Dose +add_highlight_T3_4_bg_alpha_is_1 + + diff --git a/tests/testthat/_snaps/add_risktable/add-risktable-t2-3-aligned-when-no-legend.svg b/tests/testthat/_snaps/add_risktable/add-risktable-t2-3-aligned-when-no-legend.svg new file mode 100644 index 00000000..49bfbe1b --- /dev/null +++ b/tests/testthat/_snaps/add_risktable/add-risktable-t2-3-aligned-when-no-legend.svg @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + + + + + + + + + + + + + + + + + + +86 +75 +65 +59 +50 +47 +45 +42 +40 +35 + 0 + + +At risk +Placebo + + + + + + + + + + + + + + + + + + +84 +48 +31 +14 + 7 + 4 + 4 + 4 + 4 + 3 + 0 + + +At risk +Xanomeline High Dose + + + + + + + + + + + + + + + + + + +84 +58 +31 +20 +14 +12 + 8 + 6 + 6 + 5 + 0 + + +At risk +Xanomeline Low Dose + + diff --git a/tests/testthat/_snaps/add_risktable/add-risktable-t2-4-aligned-when-legend.svg b/tests/testthat/_snaps/add_risktable/add-risktable-t2-4-aligned-when-legend.svg new file mode 100644 index 00000000..4ccd73ec --- /dev/null +++ b/tests/testthat/_snaps/add_risktable/add-risktable-t2-4-aligned-when-legend.svg @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Actual Treatment + + + +Placebo +Xanomeline High Dose +Xanomeline Low Dose + + + + + + + + + + + + + + + + + + +86 +75 +65 +59 +50 +47 +45 +42 +40 +35 + 0 + + +At risk +Placebo + + + + + + + + + + + + + + + + + + +84 +48 +31 +14 + 7 + 4 + 4 + 4 + 4 + 3 + 0 + + +At risk +Xanomeline High Dose + + + + + + + + + + + + + + + + + + +84 +58 +31 +20 +14 +12 + 8 + 6 + 6 + 5 + 0 + + +At risk +Xanomeline Low Dose + + diff --git a/tests/testthat/_snaps/add_risktable/t4-6-changing-rowgutter-affects-on-the-heights-of-the-table-and-plot.svg b/tests/testthat/_snaps/add_risktable/t4-6-changing-rowgutter-affects-on-the-heights-of-the-table-and-plot.svg new file mode 100644 index 00000000..3878fad2 --- /dev/null +++ b/tests/testthat/_snaps/add_risktable/t4-6-changing-rowgutter-affects-on-the-heights-of-the-table-and-plot.svg @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Actual Treatment + + + +Placebo +Xanomeline High Dose +Xanomeline Low Dose + + + + + + + + + + + + + + + + + + +86 +75 +65 +59 +50 +47 +45 +42 +40 +35 + 0 + + +At risk +Placebo + + + + + + + + + + + + + + + + + + +84 +48 +31 +14 + 7 + 4 + 4 + 4 + 4 + 3 + 0 + + +At risk +Xanomeline High Dose + + + + + + + + + + + + + + + + + + +84 +58 +31 +20 +14 +12 + 8 + 6 + 6 + 5 + 0 + + +At risk +Xanomeline Low Dose + + diff --git a/tests/testthat/_snaps/add_risktable/t4-no-error-when-the-default-rowgutter-is-used.svg b/tests/testthat/_snaps/add_risktable/t4-no-error-when-the-default-rowgutter-is-used.svg new file mode 100644 index 00000000..3f84643f --- /dev/null +++ b/tests/testthat/_snaps/add_risktable/t4-no-error-when-the-default-rowgutter-is-used.svg @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Actual Treatment + + + +Placebo +Xanomeline High Dose +Xanomeline Low Dose + + + + + + + + + + + + + + + + + + +86 +75 +65 +59 +50 +47 +45 +42 +40 +35 + 0 + + +At risk +Placebo + + + + + + + + + + + + + + + + + + +84 +48 +31 +14 + 7 + 4 + 4 + 4 + 4 + 3 + 0 + + +At risk +Xanomeline High Dose + + + + + + + + + + + + + + + + + + +84 +58 +31 +20 +14 +12 + 8 + 6 + 6 + 5 + 0 + + +At risk +Xanomeline Low Dose + + diff --git a/tests/testthat/_snaps/utils_visR/utils-visr-t2-3-yaxis-labels-aligned-when-no-legend.svg b/tests/testthat/_snaps/utils_visR/utils-visr-t2-3-yaxis-labels-aligned-when-no-legend.svg new file mode 100644 index 00000000..d6fe7f7b --- /dev/null +++ b/tests/testthat/_snaps/utils_visR/utils-visr-t2-3-yaxis-labels-aligned-when-no-legend.svg @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + + + + + + + + + + + + + + + + + + +53 +46 +38 +34 +27 +26 +25 +24 +23 +20 + 0 +40 +24 +20 +10 + 4 + 2 + 2 + 2 + 2 + 2 + 0 +50 +37 +23 +16 +12 +11 + 8 + 6 + 6 + 5 + 0 +33 +29 +27 +25 +23 +21 +20 +18 +17 +15 + 0 +44 +24 +11 + 4 + 3 + 2 + 2 + 2 + 2 + 1 + 0 +34 +21 + 8 + 4 + 2 + 1 + 0 + 0 + 0 + 0 + 0 + + +M, Xanomeline Low Dose +M, Xanomeline High Dose +M, Placebo +F, Xanomeline Low Dose +F, Xanomeline High Dose +F, Placebo +At risk + + diff --git a/tests/testthat/_snaps/utils_visR/utils-visr-t2-4-yaxis-labels-aligned-when-legend.svg b/tests/testthat/_snaps/utils_visR/utils-visr-t2-4-yaxis-labels-aligned-when-legend.svg new file mode 100644 index 00000000..8bf465fd --- /dev/null +++ b/tests/testthat/_snaps/utils_visR/utils-visr-t2-4-yaxis-labels-aligned-when-legend.svg @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 +140 +160 +180 +200 +Time to First Dermatologic Event +survival probability + +Sex, Planned Treatment + + + + + + +F, Placebo +F, Xanomeline High Dose +F, Xanomeline Low Dose +M, Placebo +M, Xanomeline High Dose +M, Xanomeline Low Dose + + + + + + + + + + + + + + + + + + +53 +46 +38 +34 +27 +26 +25 +24 +23 +20 + 0 +40 +24 +20 +10 + 4 + 2 + 2 + 2 + 2 + 2 + 0 +50 +37 +23 +16 +12 +11 + 8 + 6 + 6 + 5 + 0 +33 +29 +27 +25 +23 +21 +20 +18 +17 +15 + 0 +44 +24 +11 + 4 + 3 + 2 + 2 + 2 + 2 + 1 + 0 +34 +21 + 8 + 4 + 2 + 1 + 0 + 0 + 0 + 0 + 0 + + +M, Xanomeline Low Dose +M, Xanomeline High Dose +M, Placebo +F, Xanomeline Low Dose +F, Xanomeline High Dose +F, Placebo +At risk + + diff --git a/tests/testthat/_snaps/visr_survfit/plot-zoom.svg b/tests/testthat/_snaps/visr_survfit/plot-zoom.svg new file mode 100644 index 00000000..1bb632c2 --- /dev/null +++ b/tests/testthat/_snaps/visr_survfit/plot-zoom.svg @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.20 +0.40 +0.60 +0.80 +1.00 + + + + + + + + + + + + + + + + + +0 +200 +400 +600 +800 +1000 +1200 +1400 +1600 +1800 +2000 +Time +survival probability + + +Overall + + + + + + + + + + + + + + + + + + +228 +144 + 57 + 24 + 8 + 2 + 2 + 2 + 2 + 2 + 2 + + +At risk +Overall + + diff --git a/tests/testthat/test-visr_survfit.R b/tests/testthat/test-visr_survfit.R index 55925d86..376994c2 100644 --- a/tests/testthat/test-visr_survfit.R +++ b/tests/testthat/test-visr_survfit.R @@ -47,6 +47,8 @@ #' T5. The final object is a ggplot of class `ggsurvfit`. #' T5.1 The final object is a ggplot of class `ggplot`. #' T5.2 The final object is a ggplot of class `ggsurvfit`. +#' T6. The final object does not exclude parts of KM estimate. +#' T6.1 The final object zooms and does not exclude trialing pieces of lines.. # Requirement T1 ---------------------------------------------------------- @@ -510,4 +512,20 @@ testthat::test_that("T5.2 The final object is a ggplot of class `ggsurvfit`.", { testthat::expect_true(inherits(survfit_plot, "ggsurvfit")) }) +# Requirement T6 --------------------------------------------------------------- + +testthat::context("visr_plot - T6. The final object does not exclude parts of KM estimate.") + +testthat::test_that("T6.1 The final object zooms and does not exclude trialing pieces of lines.", { + plot.zoom <- + visR::estimate_KM( + data = survival::lung %>% dplyr::mutate(time = ifelse(time > 1000, 2001, time)), + formula = survival::Surv(time, status) ~ 1 + ) %>% + visR::visr(x_ticks = seq(0, 2000, by = 200)) %>% + visR::add_risktable() + + vdiffr::expect_doppelganger("plot-zoom", plot.zoom) +}) + # END OF CODE ------------------------------------------------------------- From ca40c44bffbc8bd158aa7bc5a30844235f3ee183 Mon Sep 17 00:00:00 2001 From: Daniel Sjoberg Date: Mon, 11 Jul 2022 23:16:55 -0400 Subject: [PATCH 7/7] Update test-visr_survfit.R --- tests/testthat/test-visr_survfit.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test-visr_survfit.R b/tests/testthat/test-visr_survfit.R index 376994c2..fa014eec 100644 --- a/tests/testthat/test-visr_survfit.R +++ b/tests/testthat/test-visr_survfit.R @@ -48,7 +48,7 @@ #' T5.1 The final object is a ggplot of class `ggplot`. #' T5.2 The final object is a ggplot of class `ggsurvfit`. #' T6. The final object does not exclude parts of KM estimate. -#' T6.1 The final object zooms and does not exclude trialing pieces of lines.. +#' T6.1 The final object zooms and does not exclude trialing pieces of lines. # Requirement T1 ----------------------------------------------------------