View source: R/tblParts.bare.R
tblParts | R Documentation |
Extract information about the dimensions of the various parts of a table
represented by a textTable
or tblEntries
object. This is an
internal function not intended to be called by package users.
tblParts(x)
x |
A |
Currently defined table parts are "title", "subtitle", "rowhead", "colhead", "rowheadLabels", "body", "foot".
The dimensions of a part are based on the logical structure of the table,
as represented in a textTable
object. When x
is a
tblEntries
or other entry-containing object, the dimensions of
table parts are inferred from the numbers and positions of entries in each
part. It is an error if the set of entries is not sufficiently complete
that reconstruction of dimensions is unambiguous.
When inferring dimensions from a tblEntries
or other
entry-containing object, the display option rowheadInside
is
implicitly set to FALSE. Thus table parts can be assumed to be
rectangular, occupying continguous blocks of cells in the table, and
non-overlapping.
Internal consistency of dimensions is enforced: the number of rows for "colhead" will always be at least as large as for "rowheadLabels"; the number of columns for "rowheadLabels" and "rowhead" will be equal; the number of rows in "rowhead" and "body" will be equal; and the number of columns in "colhead" and "body" will be equal.
This function relies on undo_rowhead_inside
, which uses
adim
.
Numeric matrix with one row per table part, and columns:
nr , nc |
Number of rows, columns in the part ( |
arow1 , arow2 , acol1 , acol2 |
First and last rows, first and last columns occupied by the part within
the table's augmented row-column grid. |
Row names will be set to the part IDs.
adim
for discussion of the augmented row-column grid.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.