View source: R/adjacent_blocks.bare.R
adjacent_blocks | R Documentation |
For each block of table cells in a tblBlocks
object, identify the
other blocks that are adjacent to it on each side. This is an internal
utility function, not intended to be called by package users.
adjacent_blocks(x)
x |
A |
A block B is considered adjacent to block A if (a) the blocks do not intersect (have no cells in common); and (b) the blocks touch along at least part of one edge (they span overlapping sets of rows in adjacent columns, or overlapping sets of columns in adjacent rows).
It requires storage and time proportional to the square of the number of blocks. For realistic tables this is not likely to be a problem.
A list array with one row per block in x
, and four columns. The
rows are named by the block id
, and the columns as "top", "right",
"bottom", and "left". Element [[i, j]]
is a character vector
containing the ID's of all blocks that are adjacent to block i
on
side j
. If there are no adjacent blocks, the element is
character(0)
.
tblHvrules
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.