diff --git a/R/t_dm_slide.R b/R/t_dm_slide.R index 3cb42894..1b7cbd5d 100755 --- a/R/t_dm_slide.R +++ b/R/t_dm_slide.R @@ -22,7 +22,7 @@ #' t_dm_slide <- function(adsl, arm = "TRT01P", - vars = c("AGEGR1", "SEX", "RACE", "BECOG", "BBMI"), + vars = c("AGE", "SEX", "RACE"), stats = c("median", "range", "count_fraction"), split_by_study = FALSE, side_by_side = NULL) { diff --git a/R/util.R b/R/util.R index 4821a99f..bc96f7fc 100755 --- a/R/util.R +++ b/R/util.R @@ -669,19 +669,6 @@ lyt_to_side_by_side_two_data <- function(lyt, anl, alt_counts_df, side_by_side = return(result) } -#' Checker of data frame display per patient (or not) -#' -#' @param pp per patient -#' @param colname name of column -if_display_pp <- function(pp, colname = FALSE) { - if (!pp) { - if (!colname) { - return("USUBJID") - } - return("Patient ID") - } - return(NULL) -} do_call <- function(fun, ...) { args <- list(...) diff --git a/man/if_display_pp.Rd b/man/if_display_pp.Rd deleted file mode 100644 index f408bcf3..00000000 --- a/man/if_display_pp.Rd +++ /dev/null @@ -1,16 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/util.R -\name{if_display_pp} -\alias{if_display_pp} -\title{Checker of data frame display per patient (or not)} -\usage{ -if_display_pp(pp, colname = FALSE) -} -\arguments{ -\item{pp}{per patient} - -\item{colname}{name of column} -} -\description{ -Checker of data frame display per patient (or not) -} diff --git a/man/t_dm_slide.Rd b/man/t_dm_slide.Rd index ac65a55a..7f2d4bba 100644 --- a/man/t_dm_slide.Rd +++ b/man/t_dm_slide.Rd @@ -7,7 +7,7 @@ t_dm_slide( adsl, arm = "TRT01P", - vars = c("AGEGR1", "SEX", "RACE", "BECOG", "BBMI"), + vars = c("AGE", "SEX", "RACE"), stats = c("median", "range", "count_fraction"), split_by_study = FALSE, side_by_side = NULL diff --git a/tests/testthat/test-save_output.R b/tests/testthat/test-save_output.R index 300e3a74..548926cd 100755 --- a/tests/testthat/test-save_output.R +++ b/tests/testthat/test-save_output.R @@ -1,44 +1,44 @@ test_that("save an output", { - output <- t_ds_slide(adsl = testdata$adsl) %>% decorate(title = "test title", footnote = "") + output <- t_dm_slide(adsl = testdata$adsl) %>% decorate(title = "test title", footnote = "") testthat::expect_no_error( save_output( output, - file_name = "t_ds_output", + file_name = "t_dm_output", save_rds = TRUE ) ) }) -test_that("Test save_output (Save an Output)", { - library(dplyr) - adsl <- eg_adsl %>% - mutate(TRT01A = factor(TRT01A, levels = c("A: Drug X", "B: Placebo"))) - adae <- eg_adae %>% - mutate(TRT01A = factor(TRT01A, levels = c("A: Drug X", "B: Placebo"))) - adae$ATOXGR <- adae$AETOXGR - output_dir <- tempdir() +# test_that("Test save_output (Save an Output)", { +# library(dplyr) +# adsl <- eg_adsl %>% +# mutate(TRT01A = factor(TRT01A, levels = c("A: Drug X", "B: Placebo"))) +# adae <- eg_adae %>% +# mutate(TRT01A = factor(TRT01A, levels = c("A: Drug X", "B: Placebo"))) +# adae$ATOXGR <- adae$AETOXGR +# output_dir <- tempdir() +# +# expect_snapshot(print(t_ae_pt_slide(adsl, adae, "TRT01A", 2) %>% +# decorate( +# title = "Serious Adverse Events, Safety-Evaluable Patients", +# footnote = "", +# paper = "P8", +# for_test = TRUE +# ) %>% +# save_output( +# file_name = file.path(output_dir, "t_ae_SER_SE"), +# save_rds = TRUE +# ))) +# }) - expect_snapshot(print(t_ae_pt_slide(adsl, adae, "TRT01A", 2) %>% - decorate( - title = "Serious Adverse Events, Safety-Evaluable Patients", - footnote = "", - paper = "P8", - for_test = TRUE - ) %>% - save_output( - file_name = file.path(output_dir, "t_ae_SER_SE"), - save_rds = TRUE - ))) -}) - -test_that("save an output", { - output <- t_ds_slide(adsl = testdata$adsl) %>% decorate(title = "test title", footnote = "") - testthat::expect_no_error( - save_output( - output, - file_name = "t_ds_output", - save_rds = TRUE - ) - ) -}) +# test_that("save an output", { +# output <- t_ds_slide(adsl = testdata$adsl) %>% decorate(title = "test title", footnote = "") +# testthat::expect_no_error( +# save_output( +# output, +# file_name = "t_ds_output", +# save_rds = TRUE +# ) +# ) +# })