vert_pag_indices: Find column indices for vertical pagination

View source: R/pagination.R

vert_pag_indicesR Documentation

Find column indices for vertical pagination

Description

Find column indices for vertical pagination

Usage

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

Arguments

obj

(ANY)
object to be paginated. Must have a matrix_form() method.

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.

Value

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

Examples

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


formatters documentation built on June 22, 2024, 9:42 a.m.