Learn R Programming

gtsummary (version 0.1.0)

modify_header.fmt_regression: Modifies header rows for existing fmt_regression objects.

Description

If the top row of a header column is blank, you may experience printing issues when using knitr::kable

Usage

# S3 method for fmt_regression
modify_header(x, label = NULL, est = NULL,
  ci = NULL, pvalue = NULL, ...)

Arguments

x

fmt_regression object

label

string vector including text to appear above the label column

est

string vector including text to appear above the estimate/coefficient column

ci

string vector including text to appear above the confidence interval column

pvalue

string vector including text to appear above the p-value column

...

further arguments passed to or from other methods

Examples

Run this code
# NOT RUN {
lm(hp ~ mpg + factor(cyl), mtcars) %>%
  fmt_regression() %>%
  modify_header(label = "Characteristic")
# }

Run the code above in your browser using DataLab