add_titles {pharmaRTF}R Documentation

Add hf_line title(s) and footnote(s) to a rtf_doc object

Description

Add hf_line titles/footnote objects to a rtf_doc object

Usage

add_titles(doc, ..., replace = FALSE)

add_footnotes(doc, ..., replace = FALSE)

Arguments

doc

rtf_doc on which hf_line object(s) (i.e. titles/footnotes) will be attached

...

A vector of hf_line objects to add passed to add_hf()

replace

If FALSE, lines will be appended/ordered with current header/footer lines. If TRUE, lines will replace the existing content.

Value

hf_line object(s) (i.e. titles/footnotes) to be added

Examples

# Adding titles after rtf_doc construction
ht <- huxtable::huxtable(
 column1 = 1:5,
 column2 = letters[1:5]
)
rtf <- rtf_doc(ht)

rtf <- add_titles(rtf, hf_line("The Title"))

# Adding footnotes after rtf_doc construction
ht <- huxtable::huxtable(
 column1 = 1:5,
 column2 = letters[1:5]
)
rtf <- rtf_doc(ht)

rtf <- add_footnotes(rtf, hf_line("The Footnote"))


[Package pharmaRTF version 0.1.4 Index]