remove_row_type {gtsummary} | R Documentation |
Remove rows
Description
Removes either the header, reference, or missing rows from a gtsummary table.
Usage
remove_row_type(
x,
variables = everything(),
type = c("header", "reference", "missing", "level", "all"),
level_value = NULL
)
Arguments
x |
( |
variables |
( |
type |
( |
level_value |
( |
Value
Modified gtsummary table
Examples
# Example 1 ----------------------------------
trial |>
dplyr::mutate(
age60 = ifelse(age < 60, "<60", "60+")
) |>
tbl_summary(by = trt, missing = "no", include = c(trt, age, age60)) |>
remove_row_type(age60, type = "header")
[Package gtsummary version 2.0.0 Index]