Applies the configured page geometry, running header, title block, body
fonts, footnotes and source line, and writes an RTF file. Footnotes carried
by a tlf_table result (for example a hazard ratio) are appended after the
title-block footnotes. An empty table renders as a single
"No data to report." row rather than failing.
Usage
tlf_rtf_table(
x,
file,
titles = NULL,
config = NULL,
colheader = NULL,
col_rel_width = NULL,
text_justification = NULL
)
tlf_rtf_listing(
x,
file,
titles = NULL,
config = NULL,
colheader = NULL,
col_rel_width = NULL
)Arguments
- x
A
tlf_tableresult from a builder, a pre-formatted data frame whose cells are printed as-is, a gtsummary table, or a cardscardobject; anythingas_tlf_table()can convert.- file
Output
.rtfpath.- titles
A
tlf_titles()object (for example fromtlf_resolve_titles()), a character vector of title lines, orNULL.- config
A
tlf_config();NULLresolves throughtlf_get_config().- colheader
Column header string in r2rtf
" | "format. The default uses the column names.- col_rel_width
Relative column widths. The default is the builder's widths, or equal widths.
- text_justification
Body justification per column (
"l","c","r"), recycled.
Examples
res <- tbl_demographics(ex_adsl)
f <- tempfile(fileext = ".rtf")
tlf_rtf_table(res, f, titles = tlf_titles("Demographics", number = "14.1.1"))
unlink(f)