orientation: Return or set orientation

Description Usage Arguments Value Examples

View source: R/properties.R

Description

These property functions modify or return the orientation attribute of a rtf_doc object. Options are landscape or portrait. See the rtf_doc help page for important notes about this property.

Usage

1
2
3
4
5
orientation(x, ...)

orientation(x) <- value

set_orientation(x, value)

Arguments

x

A rtf_doc object

...

Additonal arguments passed to method dispatch

value

A character vector of either 'landscape' or 'portrait'

Value

For orientation(), the orientation attribute of the supplied rtf_doc object. For `orientation<-()` and set_orientation() the modified object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(huxtable)
ht <- huxtable(
  column1 = 1:5,
  column2 = letters[1:5]
)
rtf <- rtf_doc(ht, list(hf_line("aTitle")))

orientation(rtf)
# Returns landscape

orientation(rtf) <- "portrait"
# Sets orientation to portrait

pharmaRTF documentation built on Sept. 28, 2021, 5:08 p.m.