Skip to content

Commit

Permalink
small example update
Browse files Browse the repository at this point in the history
  • Loading branch information
ddsjoberg committed Oct 3, 2024
1 parent b920f7a commit 8135294
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
25 changes: 11 additions & 14 deletions R/tbl_hierarchical.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
#'
#' @return a gtsummary table of class `"tbl_hierarchical"` (for `tbl_hierarchical()`) or `"tbl_hierarchical_count"`
#' (for `tbl_hierarchical_count()`).
#' @export
#'
#' @examples
#' ADAE_subset <- cards::ADAE |>
Expand All @@ -77,9 +78,8 @@
#' )
#'
#' # Example 2 - Rates by Highest Severity ------
#'
#' # order the severity variable
#' data$AESEV <- factor(data$AESEV, ordered = TRUE)
#' ADAE_subset$AESEV <- factor(ADAE_subset$AESEV, ordered = TRUE)
#'
#' tbl_hierarchical(
#' data = ADAE_subset,
Expand All @@ -91,7 +91,15 @@
#' label = list(AESEV = "Highest Severity")
#' )
#'
#' @export
#'
#' # Example 3 - Event Counts -------------------
#' tbl_hierarchical_count(
#' data = ADAE_subset,
#' variables = c(AESOC, AETERM, AESEV),
#' by = TRTA,
#' overall_row = TRUE
#' )
#'
tbl_hierarchical <- function(data,
variables,
by = NULL,
Expand Down Expand Up @@ -142,17 +150,6 @@ tbl_hierarchical <- function(data,
}

#' @rdname tbl_hierarchical
#'
#' @examples
#' # Example 3 - Event Counts -----------------------------------
#'
#' tbl_hierarchical_count(
#' data = data,
#' variables = c(AESOC, AETERM, AESEV),
#' by = TRTA,
#' overall_row = TRUE
#' )
#'
#' @export
tbl_hierarchical_count <- function(data,
variables,
Expand Down
7 changes: 3 additions & 4 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 8135294

Please sign in to comment.