Last chance! 50% off unlimited learning
Sale ends in
Removes either the header, reference, or missing rows from a gtsummary table.
remove_row_type(
x,
variables = everything(),
type = c("header", "reference", "missing")
)
gtsummary object
variables to to remove rows from. Default is everything()
type of row to remove. Must be one of
c("header", "reference", "missing")
Example 1
Review list, formula, and selector syntax used throughout gtsummary
# NOT RUN {
# Example 1 ----------------------------------
library(dplyr, warn.conflicts = FALSE, quietly = TRUE)
remove_row_type_ex1 <-
trial %>%
select(trt, age) %>%
mutate(
age60 = case_when(age < 60 ~ "<60", age >= 60 ~ "60+")
) %>%
tbl_summary(by = trt, missing = "no") %>%
remove_row_type(age60, type = "header")
# }
Run the code above in your browser using DataLab