tbl_2way_summary: Two-way Summary

Description Usage Arguments Value Example Output Examples

View source: R/tbl_2way_summary.R

Description

Summarize a continuous variable by two categorical variables

Usage

1
2
3
4
5
6
7
8
tbl_2way_summary(
  data,
  row,
  col,
  con,
  label = NULL,
  statistic = "{median} ({p25}, {p75})"
)

Arguments

data

a data frame

row

column name from data= making the rows of the resulting table

col

column name from data= making the columns of the resulting table

con

column name from data=of a continuous variable that will be summarized in each cell of the table

label

list of formulas specifying variables labels

statistic

string indicating the summary statistics. Default is "{median} ({p25}, {p75})"

Value

a gtsummary table

Example Output

Example 1

Examples

1
2
3
tbl_2way_summary_ex1 <-
  trial %>%
  tbl_2way_summary(grade, trt, marker)

ddsjoberg/bstfun documentation built on May 4, 2021, 9:39 a.m.