Pagination of a listing. This can be vertical for long listings with many rows or horizontal if there are many columns.
paginate_listing(
lsting,
page_type = "letter",
font_family = "Courier",
font_size = 8,
lineheight = 1,
landscape = FALSE,
pg_width = NULL,
pg_height = NULL,
margins = c(top = 0.5, bottom = 0.5, left = 0.75, right = 0.75),
lpp = NA_integer_,
cpp = NA_integer_,
colwidths = propose_column_widths(lsting),
tf_wrap = !is.null(max_width),
max_width = NULL,
verbose = FALSE
)
A list of listings' objects that are meant to be on separated pages.
For pag_tt_indices
a list of paginated-groups of row-indices of lsting
.
for paginate_listing
a list containing separate
listing_df
objects for each page, for pag_listing_indices
,
a list of indices in the direction being paginated corresponding
to the individual pages in that dimension.
listing_df. The listing to paginate.
character(1). Name of a page type. See
page_types
. Ignored when pg_width
and pg_height
are set directly.
character(1). Name of a font family. An error will be thrown if the family named is not monospaced. Defaults to Courier.
numeric(1). Font size, defaults to 12.
numeric(1). Line height, defaults to 1.
logical(1). Should the dimensions of page_type
be inverted for landscape? Defaults to FALSE
, ignored when
pg_width
and pg_height
are set directly.
numeric(1). Page width in inches.
numeric(1). Page height in inches.
numeric(4). Named numeric vector containing 'bottom'
,
'left'
, 'top'
, and 'right'
margins in inches. Defaults
to .5
inches for both vertical margins and .75
for both
horizontal margins.
numeric(1) or NULL. Number of row lines (not counting titles and
footers) to have per page. Standard is 70
while NULL
disables vertical
pagination.
numeric(1) or NULL. Width (in characters) of the pages for
horizontal pagination. NULL
(the default) indicates no horizontal
pagination should be done.
numeric vector. Column widths (in characters) for use with vertical pagination.
logical(1). Should the texts for title, subtitle, and footnotes be wrapped?
integer(1), character(1) or NULL
. Width that title
and footer (including footnotes) materials should be
word-wrapped to. If NULL
, it is set to the current print width
of the session (getOption("width")
). If set to "auto"
,
the width of the table (plus any table inset) is used. Ignored
completely if tf_wrap
is FALSE
.
logical(1). Should additional informative messages about the search for
pagination breaks be shown. Defaults to FALSE
.
dat <- ex_adae
lsting <- as_listing(dat[1:25, ], disp_cols = c("USUBJID", "AESOC", "RACE", "AETOXGR", "BMRKR1"))
mat <- matrix_form(lsting)
cat(toString(mat))
paginate_listing(lsting, lpp = 10)
paginate_listing(lsting, cpp = 100, lpp = 40)
paginate_listing(lsting, cpp = 80, lpp = 40, verbose = TRUE)
Run the code above in your browser using DataLab