Skip to content

Commit

Permalink
Merge pull request #35 from Merck/add_empty_row
Browse files Browse the repository at this point in the history
add empty row between categotical group and statistics
  • Loading branch information
wangben718 committed Jul 31, 2024
2 parents c3ead88 + c266573 commit 5b7b676
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 116 deletions.
4 changes: 2 additions & 2 deletions R/collect.R
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ collect_baseline <- function(
}
}

pop_num <- rbind(pop_num_group, pop_num)
pop_prop <- rbind(pop_prop_group, pop_prop)
pop_num <- rbind(pop_num_group, rep(NA, ncol(pop_num)), pop_num)
pop_prop <- rbind(pop_prop_group, rep(NA, ncol(pop_num)), pop_prop)
}

# variable lower level
Expand Down
2 changes: 1 addition & 1 deletion R/react_base_char.R
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ react_base_char <- function(
details = function(index) {
if (index > 1 &
!(tolower(tbl_sl$name[index]) %in% c("mean", "sd", "median", "min", "max", "se", "q1", "q3", "q1 to q3", "range")) &
tbl_sl$var_label[index] %in% ae_subgrp_label
tbl_sl$var_label[index] %in% ae_subgrp_label & !is.na(tbl_sl$name[index])
) {
# get the index of the AE subgroup variable by the index in the baseline char table
idx_ae_subgroup <- which(tbl_sl$var_label[index] == ae_subgrp_label)
Expand Down
3 changes: 2 additions & 1 deletion R/rtf_base_char_subgroup.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#' @export
#'
#' @examples
#' \dontrun{
#' meta <- meta_sl_example()
#'
#' outdata <- prepare_base_char_subgroup(
Expand All @@ -49,7 +50,7 @@
#' path_outdata = tempfile(fileext = ".Rdata"),
#' path_outtable = tempfile(fileext = ".rtf")
#' )
#'
#' }
rtf_base_char_subgroup <- function(
outdata,
source,
Expand Down
3 changes: 2 additions & 1 deletion man/rtf_base_char_subgroup.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions tests/testthat/test-independent-testing-rtf_base_char.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# library(metalite)
#
# meta <- meta_sl_example()
# outdata <- prepare_sl_summary(meta,
# outdata <- prepare_base_char(meta,
# population = "apat",
# observation = "apat",
# parameter = "age;gender"
# )
#
Expand Down
109 changes: 0 additions & 109 deletions vignettes/metalite-sl-subgroup.Rmd

This file was deleted.

0 comments on commit 5b7b676

Please sign in to comment.