inline_text.fmt_regression: Report statistics from 'fmt_regression' and...

Description Usage Arguments Value Examples

Description

Report statistics from fmt_regression and fmt_uni_regression inline in an Rmarkdown document

Usage

1
2
3
4
5
6
7
## S3 method for class 'fmt_regression'
inline_text(x, cell,
  stat = "{est} (95% CI {ci}; {p_pvalue})", sep = ":", ...)

## S3 method for class 'fmt_uni_regression'
inline_text(x, cell,
  stat = "{est} (95% CI {ci}; {p_pvalue})", sep = ":", ...)

Arguments

x

object of class fmt_regression or fmt_uni_regression object

cell

identifier for which cell to return from the fmt_regression object

stat

Statistic to report. User can access the primary estimate (est), the lower and upper limit of the confidence interval (ll and ul), confidence interval (ci), N (N), pvalue (pvalue), and pvalue with p= or p< appended (p_pvalue). Default is "{est} (95% CI {ci}; {p_pvalue})"

sep

a character string to separate the terms

...

further arguments passed from generic inline_text()

Value

Formatted descriptive statistics from a fmt_regression object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
mod <- glm(response ~ age + grade + stage, trial, family = binomial(link = "logit")) %>%
  fmt_regression(exponentiate = TRUE)
inline_text(mod, "age")

inline_text(mod, "grade:III")

trial %>%
  fmt_uni_regression(
    method = "lm",
    y = "age"
  ) %>%
  inline_text("grade:II")

ddsjoberg/gtsummary-v0.1 documentation built on June 4, 2019, 7:48 a.m.