margins {pharmaRTF} | R Documentation |
Return or set margins
Description
These property functions return or set the margin attribute of a rtf_doc
object. These are stored as a named vector. Names should be top
,
bottom
, left
, and right
. Margins are measured in inches.
Usage
margins(x, ...)
margins(x) <- value
set_margins(x, value)
Arguments
x |
A |
... |
Additonal arguments passed to method dispatch |
value |
A named list or vector detailing the page margins |
Value
For margin()
, a named vector of the margin attribute of the
supplied rtf_doc
. For `margin<-()`
and set_margin()
the modified object.
Examples
library(huxtable)
ht <- huxtable(
column1 = 1:5,
column2 = letters[1:5]
)
rtf <- rtf_doc(ht, list(hf_line("aTitle")))
margins(rtf)
# Returns c(top = 1, bottom = 1, left = 1, right = 1)
margins(rtf) <- c(top = 2)
# Sets top margin to 2
[Package pharmaRTF version 0.1.4 Index]