Prints a compact summary of the internal rtfreport render product: its
page and section counts, the default page geometry (paper, orientation and
size in inches), and the font / colour table sizes.
Usage
# S3 method for class 'rtfreport'
print(x, ...)Details
Most users never build an rtfreport directly: assemble documents with
rtf_document() and the pipe verbs (that object has its own print method),
then hand them to generate_rtfreport(). An rtfreport is the lower-level
render product that generate_rtfreport() also accepts, and this method lets
you inspect one if you hold it.
Examples
df <- data.frame(Parameter = c("Age", "Sex"),
Value = c("54.2 (11.3)", "31 (51.7%)"),
stringsAsFactors = FALSE)
doc <- rtf_document() |>
rtf_tables(rtftable(df, border = "tfl"),
titles = list("Table 14.1.1"))
# generate_rtfreport() returns the rendered report invisibly, so capture it
# to inspect what was written: how many pages, sections, titles.
f <- tempfile(fileext = ".rtf")
rep <- generate_rtfreport(doc, f, overwrite = TRUE)
print(rep)
#> [1] "/tmp/RtmpGqDEnG/file1e9554a28274.rtf"
unlink(f)