niceTable: Format any generic table like the reportRx tables. Table...

Description Usage Arguments

View source: R/main.R

Description

Format any generic table like the reportRx tables. Table output defaults to kable, but the kableExtra package doesn't work well with Word. To export nice tables to Word use options('doc_type'='doc')

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
niceTable(
  tab,
  rmstr = "[._]",
  digits = 2,
  to_indent = numeric(0),
  to_bold = numeric(0),
  caption = NULL,
  chunk_label,
  ...
)

Arguments

tab

a table to format, it assumes the first column contains labels to tidy

rmstr

characters to replace with spaces in the output, defaults to . and _

digits

number of digits to round numeric columns to

to_indent

numeric vector the length of nrow(tab) indicating which rows to indent

to_bold

numeric vector the length of nrow(tab) indicating which rows to bold

caption

table caption

chunk_label

only used if out_fmt = doc to allow cross-referencing

...

other variables passed to covsum and the table output function


Avery-Lisa/myReportRx documentation built on May 23, 2021, 2:30 a.m.