Skip to content

Commit

Permalink
Merge branch 'main' into 588_adding_stratified_newcombe@main
Browse files Browse the repository at this point in the history
  • Loading branch information
danielinteractive authored Sep 12, 2022
2 parents 8be2d07 + 06133ff commit 8b549a0
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 22 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: tern
Title: Create Common TLGs Used in Clinical Trials
Version: 0.7.9.9004
Date: 2022-08-30
Version: 0.7.9.9005
Date: 2022-09-09
Authors@R: c(
person("Joe", "Zhu", , "[email protected]", role = c("aut", "cre")),
person("Daniel", "Sabanés Bové", , "[email protected]", role = "aut"),
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tern 0.7.9.9004
# tern 0.7.9.9005

### Enhancements
* Added `DescTools` `BinomDiffCI` function within `tern`.
Expand Down
5 changes: 4 additions & 1 deletion R/desctools_binom_diff.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ h_recycle <- function(...) {
#' rsp <- sample(c(TRUE, FALSE), replace = TRUE, size = 20)
#' grp <- factor(c(rep("A", 10), rep("B", 10)))
#' tbl <- table(grp, factor(rsp, levels = c(TRUE, FALSE)))
#' desctools_binom(tbl[1], sum(tbl[1], tbl[3]), tbl[2], sum(tbl[2], tbl[4]), conf.level = 0.90, method = "waldcc")
#' desctools_binom(
#' tbl[1], sum(tbl[1], tbl[3]), tbl[2], sum(tbl[2], tbl[4]),
#' conf.level = 0.90, method = "waldcc"
#' )
#' }
#'
#' @keywords internal
Expand Down
5 changes: 3 additions & 2 deletions R/g_lineplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@
#' @examples
#' library(nestcolor)
#'
#' adsl <- scda::synthetic_cdisc_data("latest")$adsl
#' adlb <- scda::synthetic_cdisc_data("latest")$adlb
#' cached_data <- scda::synthetic_cdisc_data("latest")
#' adsl <- cached_data$adsl
#' adlb <- cached_data$adlb
#' adlb <- dplyr::filter(adlb, ANL01FL == "Y", PARAMCD == "ALT", AVISIT != "SCREENING")
#' adlb$AVISIT <- droplevels(adlb$AVISIT)
#' adlb <- dplyr::mutate(adlb, AVISIT = forcats::fct_reorder(AVISIT, AVISITN, min))
Expand Down
23 changes: 17 additions & 6 deletions R/summarize_ancova.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ h_ancova <- function(.var,
#'
#' # Internal function - s_ancova
#' \dontrun{
#' s_ancova(df, .var, .df_row, variables, .ref_group, .in_ref_col = FALSE, conf_level, interaction_y = FALSE, interaction_item = NULL)
#' s_ancova(
#' df, .var, .df_row, variables, .ref_group,
#' .in_ref_col = FALSE,
#' conf_level, interaction_y = FALSE, interaction_item = NULL
#' )
#' }
#'
#' @keywords internal
Expand Down Expand Up @@ -213,7 +217,11 @@ s_ancova <- function(df,
#' @examples
#' # Internal function - a_ancova
#' \dontrun{
#' a_ancova(df, .var, .df_row, variables, .ref_group, .in_ref_col = FALSE, interaction_y = FALSE, interaction_item = NULL, conf_level)
#' a_ancova(
#' df, .var, .df_row, variables, .ref_group,
#' .in_ref_col = FALSE,
#' interaction_y = FALSE, interaction_item = NULL, conf_level
#' )
#' }
#'
#' @keywords internal
Expand All @@ -240,8 +248,10 @@ a_ancova <- make_afun(
#' library(rtables)
#' library(dplyr)
#'
#' adsl <- synthetic_cdisc_data("rcd_2022_02_28")$adsl
#' adqs <- synthetic_cdisc_data("rcd_2022_02_28")$adqs
#' cached_data <- synthetic_cdisc_data("rcd_2022_02_28")
#'
#' adsl <- cached_data$adsl
#' adqs <- cached_data$adqs
#' adqs_single <- adqs %>%
#' filter(
#' AVISIT == "WEEK 1 DAY 8", # single time point
Expand Down Expand Up @@ -270,8 +280,9 @@ a_ancova <- make_afun(
#' build_table(adqs_single, alt_counts_df = adsl)
#'
#' # Another example: count the interaction between rows and columns into consideration
#' adsl <- synthetic_cdisc_data("rcd_2022_02_28")$adsl
#' adqs <- synthetic_cdisc_data("rcd_2022_02_28")$adqs
#'
#' adsl <- cached_data$adsl
#' adqs <- cached_data$adqs
#' adqs_single <- adqs %>%
#' filter(AVISIT %in% c("WEEK 1 DAY 8", "WEEK 2 DAY 15", "WEEK 5 DAY 36")) %>%
#' droplevels() %>%
Expand Down
5 changes: 4 additions & 1 deletion man/desctools_binom.Rd

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

5 changes: 3 additions & 2 deletions man/g_lineplot.Rd

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

23 changes: 17 additions & 6 deletions man/summarize_ancova.Rd

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

2 changes: 1 addition & 1 deletion vignettes/tern.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,4 @@ The [`teal` package](https://insightsengineering.github.io/teal/) is a shiny-bas

In summary, `tern` contains many additional functions for creating tables, listing and graphs used in clinical trials and other statistical analyses. The design of the package gives users a lot of flexibility to meet the analysis needs in a regulatory or exploratory reporting context.

**For more information please explore [the tern website](https://insightsengineering.github.io/tern).**
**For more information please explore [the tern website](https://insightsengineering.github.io/tern/).**

0 comments on commit 8b549a0

Please sign in to comment.