Learn R Programming

rtables (version 0.5.1)

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,
  hsep = "-",
  indent_size = 2,
  ...
)

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

hsep

character(1). Set of character(s) to be repeated as the separator between the header and body of the table when rendered as text. Defaults to a connected horrizontal line (unicode 2014) in locals that use a UTF charset, and to - elsewhere (with a once per session warning).

indent_size

numeric(1). Number of spaces to use per indent level. Defaults to 2

...

arguments passed on to paginate_table

See Also

export_as_txt

Examples

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

tbl <- build_table(lyt, ex_adsl)

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

Run the code above in your browser using DataLab