Skip to content

Commit

Permalink
small example change
Browse files Browse the repository at this point in the history
  • Loading branch information
ddsjoberg committed Oct 3, 2024
1 parent f982565 commit b920f7a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
15 changes: 8 additions & 7 deletions R/tbl_hierarchical.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#' Hierarchical table
#'
#' @description `r lifecycle::badge('experimental')`\cr
#' *This is an early release of this function, and there will likely be changes in the next release.*
#'
#' Use these functions to generate hierarchical tables.
#'
Expand Down Expand Up @@ -58,30 +59,30 @@
#' (for `tbl_hierarchical_count()`).
#'
#' @examples
#' data <- cards::ADAE |>
#' ADAE_subset <- cards::ADAE |>
#' dplyr::filter(
#' AESOC %in% unique(cards::ADAE$AESOC)[1:20],
#' AETERM %in% unique(cards::ADAE$AETERM)[1:20]
#' AESOC %in% unique(cards::ADAE$AESOC)[1:5],
#' AETERM %in% unique(cards::ADAE$AETERM)[1:5]
#' )
#'
#' # Example 1 - Event Rates ------------------------------------
#' # Example 1 - Event Rates --------------------
#'
#' tbl_hierarchical(
#' data = data,
#' data = ADAE_subset,
#' variables = c(AESOC, AETERM, AESEV),
#' by = TRTA,
#' denominator = cards::ADSL |> mutate(TRTA = ARM),
#' id = USUBJID,
#' overall_row = TRUE
#' )
#'
#' # Example 2 - Rates by Highest Severity ----------------------
#' # Example 2 - Rates by Highest Severity ------
#'
#' # order the severity variable
#' data$AESEV <- factor(data$AESEV, ordered = TRUE)
#'
#' tbl_hierarchical(
#' data = data,
#' data = ADAE_subset,
#' variables = c(AESOC, AESEV),
#' by = TRTA,
#' id = USUBJID,
Expand Down
15 changes: 8 additions & 7 deletions man/tbl_hierarchical.Rd

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

0 comments on commit b920f7a

Please sign in to comment.