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
)

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. Column widths (in characters) for use with vertical pagination.

verbose

logical(1). Should additional informative messages about the search for pagination breaks 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

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)
lapply(colpaginds, function(j) mtcars[, j, drop = FALSE])

formatters documentation built on Aug. 25, 2023, 5:18 p.m.