3.11 outTable
This function will output a simple table nicely in any of the main R Markdown output formats, including bookdown.
Arguments:
to_indent
row indices specifying a small indent in the first columnto_bold
row indices specifying which rows to boldcaption
a caption to print above the table.
library(janitor)
<- lung %>% tabyl(Status,Sex)
tab outTable(tab,
to_indent=1,
to_bold=2,
caption= 'Status by Sex in the Lung data' )
Status | Female | Male | NA_ |
---|---|---|---|
0 | 36 | 24 | 3 |
1 | 50 | 108 | 7 |