Skip to contents

Writes a table that a Table_*() function returned to a Rich Text Format file, as a report takes it: the title and subtitle above, the table, and the footnotes beneath, the table's own last. It is written by the r2rtf package, which gsm.bio suggests and does not import; nothing is fetched, so it works offline.

Usage

Write_RTF(dfTable, strFile, strOrientation = "landscape")

Arguments

dfTable

data.frame A table from Table_GroupComparison() or one of the functions beside it, with its title, subtitle and footnotes.

strFile

character The file to write, in a folder that exists. A file already there is replaced.

strOrientation

character "landscape" (the default) or "portrait".

Value

strFile, invisibly.

Examples

if (requireNamespace("r2rtf", quietly = TRUE)) {
  dfTable <- Table_CrossTab(
    Synthetic_Results,
    Synthetic_Participants,
    lSettings = list(row_by = "ARM", col_by = "RESPONSE", title = "{rows} by {columns}")
  )
  Write_RTF(dfTable, tempfile(fileext = ".rtf"))
}