get_summary_gtsummary {IPDFileCheck}R Documentation

Function to return the summary table using gtsummary package

Description

Function to return the summary table using gtsummary package

Usage

get_summary_gtsummary(
  the_data,
  selectvar,
  byvar = NULL,
  no_digits = 2,
  label = NULL
)

Arguments

the_data

a data frame

selectvar

variables to be selected for summary

byvar

A column name (quoted or unquoted) in data.

no_digits

no of digits to diaply, by default it is 2 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

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

[Package IPDFileCheck version 0.8.1 Index]