Learn R Programming

rtables (version 0.4.0)

export_as_pdf: Export as PDF

Description

The PDF output is based on the ASCII output created with toString

Usage

export_as_pdf(
  tt,
  file,
  width = 11.7,
  height = 8.3,
  margins = c(4, 4, 4, 4),
  fontsize = 8,
  paginate = TRUE,
  lpp = NULL,
  ...
)

Arguments

tt

TableTree (or related class). A TableTree object representing a populated table.

file

file to write, must have .pdf extension

width

the width and height of the graphics region in inches

height

the width and height of the graphics region in inches

margins

A numeric vector interpreted in the same way as par(mar) in base graphics.

fontsize

the size of text (in points)

paginate

logical(1). Should tt be paginated before writing the file.

lpp

numeric. Maximum lines per page including (re)printed header and context rows

...

arguments passed on to paginate_table

See Also

export_as_txt

Examples

Run this code
# NOT RUN {
lyt <- basic_table() %>%
  split_cols_by("ARM") %>%
  analyze(c("AGE", "BMRKR2", "COUNTRY"))

tbl <- build_table(lyt, ex_adsl)

# }
# NOT RUN {
tf <- tempfile(fileext = ".pdf")
export_as_pdf(tbl, file = tf, height = 4)
tf <- tempfile(fileext = ".pdf")
export_as_pdf(tbl, file = tf, lpp = 8)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab