Learn R Programming

pharmaRTF (version 0.1.5)

orientation: Return or set orientation

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

orientation(x, ...)

orientation(x) <- value

set_orientation(x, value)

Value

For orientation(), the orientation attribute of the supplied

rtf_doc object. For `orientation<-()` and

set_orientation() the modified object.

Arguments

x

A rtf_doc object

...

Additonal arguments passed to method dispatch

value

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

Examples

Run this code
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

Run the code above in your browser using DataLab