theme_gtsummary_apa: APA-like gtsummary theme

View source: R/theme_gtsummary_apa.R

theme_gtsummary_apaR Documentation

APA-like gtsummary theme

Description

Set an APA-like theme for gtsummary tables, i.e. means and standard deviations with two decimals are calculated for continuous variables, the Welch test (as the default t.test function in R calculates a Welch test) is the default statistical test for a two group comparison, and the method for correcting p-values is the false discovery rate correction.

Usage

theme_gtsummary_apa(set_theme = TRUE)

Arguments

set_theme

Logial, defaults to TRUE. Indicates whether the theme should be loaded.

Value

An APA-like gtsummary table

See Also

theme_gt_apa()

Examples

library(gtsummary)
theme_gtsummary_apa()

trial %>%
 select(trt, age, response, ttdeath) %>%
 tbl_summary(by = trt) %>%
 add_n() %>%
 add_p() %>%
 add_q(quiet = TRUE)

benediktclaus/benelib documentation built on Feb. 1, 2024, 1:39 a.m.