get_summary_gtsummary: Function to return the summary table using gtsummary package

Description Usage Arguments Value Examples

View source: R/IPDFileCheck.R

Description

Function to return the summary table using gtsummary package

Usage

1
get_summary_gtsummary(the_data, selectvar, byvar = NULL, label = NULL)

Arguments

the_data

a data frame

selectvar

variables to be selected for summary

byvar

A column name (quoted or unquoted) in data. Summary statistics will be calculated separately for each level of the by variable. If NULL, summary statistics are calculated using all observations.

label

List of formulas specifying variables labels,

Value

the summary using gtsummarys tbl_summary option

Examples

1
2
3
trial <- gtsummary::trial
table1 <- get_summary_gtsummary(trial, c("trt", "age", "grade"),
byvar = "trt")

IPDFileCheck documentation built on Feb. 1, 2022, 9:07 a.m.