as.prBlocks: Promote a Data Frame to a 'prblocks' Object

Description Usage Arguments Details Value See Also

View source: R/as.dfObj.bare.R

Description

Promote a data frame to a prBlocks object, containing plot-ready blocks for a table. This is an internal function not intended to be called by package users.

Usage

1

Arguments

x

An object inheriting from data.frame. Each row represents one table block (a rectangular set of table cells). Columns must include all those required for a tblBlocks object (see dfSpecs), plus all the graphical properties required to display a block (see grSpecs).

Details

Normally plot-ready blocks are created from a tblBlocks object via function prBlocks. This function allows them to be created or edited directly in a data frame, without necessarily using a predefined style.

Columns arow1, arow2, acol1 and acol2 refer to row and column numbers in the augmented row-column grid of the table; see adim for more information.

The graphical properties required for a plot-ready block, and their types, are defined in object grSpecs.

If column enabled was not present in x it will be added, with value FALSE for all blocks. Attributes current_scale, rowgroupSize, and rowheadInside will be added if not present, with values 1.0, NA, and NA, respectively.

If x is already a prBlocks object, this function does some validity checks. If x is NULL, a valid but empty prBlocks object is returned.

Value

An object of S3 classes prBlocks, tblBlocks, and data.frame. See function prBlocks for a full description of the class.

See Also

prBlocks, tblBlocks


tablesgg documentation built on June 3, 2021, 1:06 a.m.