Learn R Programming

formatters (version 0.5.12)

vert_pag_indices: Find column indices for vertical pagination

Description

Find column indices for vertical pagination

Usage

vert_pag_indices(
  mf,
  cpp = 40,
  colwidths = NULL,
  verbose = FALSE,
  rep_cols = 0L,
  fontspec,
  nosplitin = character(),
  round_type = obj_round_type(mf)
)

Value

A list partitioning the vector of column indices into subsets for 1 or more horizontally paginated pages.

Arguments

mf

(MatrixPrintForm)
object to be paginated.

cpp

(numeric(1))
number of characters per page (width).

colwidths

(numeric)
vector of column widths (in characters) for use in vertical pagination.

verbose

(flag)
whether additional informative messages about the search for pagination breaks should be shown. Defaults to FALSE.

rep_cols

(numeric(1))
number of columns (not including row labels) to be repeated on every page. Defaults to 0.

fontspec

(font_spec)
a font_spec object specifying the font information to use for calculating string widths and heights, as returned by font_spec().

nosplitin

(character)
list of names of subtables where page breaks are not allowed, regardless of other considerations. Defaults to none.

round_type

(string)
.
The type of rounding to perform. Allowed values: ("iec", "iec_mod" or "sas")
iec, the default, and iec_mod performs rounding compliant with IEC 60559 (see notes in round_fmt()), while sas performs nearest-value rounding consistent with rounding within SAS.
In addition, the rounding of a negative number that rounds to zero will be presented as 0 (with the appropriate number of trailing zeros) for both sas and iec_mod, while for iec, it will be presented as -0 (with the appropriate number of trailing zeros).

Examples

Run this code
mf <- basic_matrix_form(df = mtcars)
colpaginds <- vert_pag_indices(mf, fontspec = font_spec())
lapply(colpaginds, function(j) mtcars[, j, drop = FALSE])

Run the code above in your browser using DataLab