create_header: Creates header rows for 'fmt_table1' of 'fmt_regression'...

Description Usage Arguments

Description

This function takes in a data frame and information to include in the header rows. The user will rarely call this function directly, rather they will use a wrapper for this function modify_header().

Usage

1
2
3
create_header(data = NULL, by = NULL, mod = NULL, label = NULL,
  stat_by = NULL, stat_overall = NULL, pvalue = NULL, est = NULL,
  ci = NULL, N = NULL)

Arguments

data

data frame. fmt_table1 only.

by

string of column name in data. fmt_table1 only.

mod

regression model object. fmt_regression only.

label

string vector including text to appear above the label column. fmt_table1 and fmt_regression.

stat_by

string vector of text to include above the summary statistics stratified by a variable. The following fields are available for use in the headers: n, N, p, name, label, and level. n is the number of observations in each by group. N is the total number of observations. p is the percentage of rows in a by group. name is the name of the by variable. level is the by variable level. Must specify 'by' along with 'stat_by'. fmt_table1 only.

stat_overall

string vector including text to appear above the overall summary statistics. N, the total number of observations, is available for use in the description. fmt_table1 only

pvalue

string vector including text to appear above the p-value column. fmt_table1 and fmt_regression.

est

string vector including text to appear above the coefficient column. fmt_regression only.

ci

string vector including text to appear above the confidence interval column. fmt_regression only.

N

string vector including text to appear above the N column


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