to_kable: Pass tibble_one to kable

Description Usage Arguments Value

View source: R/to_kable.R

Description

\Sexpr[results=rd, stage=render]{lifecycle::badge("stable")}

Tabular summaries of characteristics (i.e., table one) are generally presented in a table with columns that describe the overall sample and subsets of the sample designated by a grouping variable. In addition, it is expected that variable labels and units will be indicated, and footnotes will be placed at the bottom of the table with full descriptions of variables and abbreviations that appear in the table. This function automates these tasks.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
to_kable(
  object,
  use_groups = TRUE,
  indent_groups = FALSE,
  footnote_notation = "symbol",
  include_1st_header = TRUE,
  include_2nd_header = TRUE,
  include_3rd_header = TRUE,
  bold_headers = TRUE,
  ...
)

Arguments

object

a tibble_one object

use_groups

T/F, should rows be grouped?

indent_groups

T/F, should entries within groups be indented? (this has no effect if use_groups is FALSE)

footnote_notation

character value indicating footnote symbols to use in tables. Eligible values are symbol, number, and alphabet.

include_1st_header

T/F, should bottom header be included?

include_2nd_header

T/F, should middle header be included?

include_3rd_header

T/F, should top header be included?

bold_headers

T/F, should header labels be printed in bold?

...

Arguments passed on to knitr::kable

format

A character string. Possible values are latex, html, markdown, pandoc, and rst; this will be automatically determined if the function is called within knitr; it can also be set in the global option knitr.table.format. If format is a function, it must return a character string.

caption

The table caption.

label

The table reference label. By default, the label is obtained from knitr::opts_current$get('label').

Value

A character vector of the table source code, i.e., code that can be presented in 'R Markdown' documents.


bcjaeger/tibbleOne documentation built on May 3, 2020, 3:56 p.m.