Learn R Programming

rtables (version 0.4.0)

make_row_df: Make row and column layout summary data.frames for use during pagination

Description

Used for Pagination

Usage

make_row_df(
  tt,
  colwidths = NULL,
  visible_only = TRUE,
  rownum = 0,
  indent = 0L,
  path = character(),
  incontent = FALSE,
  repr_ext = 0L,
  repr_inds = integer(),
  sibpos = NA_integer_,
  nsibs = NA_integer_,
  nrowrefs = 0L,
  ncellrefs = 0L,
  nreflines = 0L
)

# S4 method for VTableTree make_row_df( tt, colwidths = NULL, visible_only = TRUE, rownum = 0, indent = 0L, path = character(), incontent = FALSE, repr_ext = 0L, repr_inds = integer(), sibpos = NA_integer_, nsibs = NA_integer_ )

# S4 method for TableRow make_row_df( tt, colwidths = NULL, visible_only = TRUE, rownum = 0, indent = 0L, path = "root", incontent = FALSE, repr_ext = 0L, repr_inds = integer(), sibpos = NA_integer_, nsibs = NA_integer_ )

# S4 method for LabelRow make_row_df( tt, colwidths = NULL, visible_only = TRUE, rownum = 0, indent = 0L, path = "root", incontent = FALSE, repr_ext = 0L, repr_inds = integer(), sibpos = NA_integer_, nsibs = NA_integer_ )

make_col_df(tt, visible_only = TRUE)

Arguments

tt

TableTree (or related class). A TableTree object representing a populated table.

colwidths

numeric. Internal detail do not set manually.

visible_only

logical(1). Should only visible aspects of the table structure be reflected in this summary. Defaults to TRUE.

rownum

numeric(1). Internal detail do not set manually.

indent

integer(1). Internal detail do not set manually.

path

character. A vector path for a position within the structure of a tabletree. Each element represents a subsequent choice amongst the children of the previous choice.

incontent

logical(1). Internal detail do not set manually.

repr_ext

integer(1). Internal detail do not set manually.

repr_inds

integer. Internal detail do not set manually.

sibpos

integer(1). Internal detail do not set manually.

nsibs

integer(1). Internal detail do not set manually.

nrowrefs

integer(1). Internal detail do not set manually.

ncellrefs

integer(1). Internal detail do not set manually.

nreflines

integer(1). Internal detail do not set manually.

Value

a data.frame of row/column-structure information used by the pagination machinery.

Details

When visible_only is TRUE, the resulting data.frame will have exactly one row per visible row in the table. This is useful when reasoning about how a table will print, but does not reflect the full pathing space of the structure (though the paths which are given will all work as is).

When visible_only is FALSE, every structural element of the table (in row-space) will be reflected in the returned data.frame, meaning the full pathing-space will be represented but some rows in the layout summary will not represent printed rows in the table as it is displayed.