View source: R/prEntries.bare.R
prEntries | R Documentation |
Assign graphical properties to table entries, based on a style and scaling
factor. This creates fully plot-ready (pr
) entries. This is an
internal function, not intended to be called by package users.
prEntries(x, style=tablesggOpt("entryStyle"), scale=1.0)
x |
A |
style |
A |
scale |
Numeric multiplier used to increase or decrease the displayed size of
entries, relative to the natural size implied by |
The graphical properties available for an entry, and their types, are
defined in object grProps
. They include both properties for the
entry text itself (size, font, color, etc) and for the cell(s) containing
the entry (background color, border thickness and color).
Justification of text within a cell is specified by properties
hjust
and vjust
. Their interpretation is with respect to
the boundaries of the cell: 0 means justification toward the left/top of
the cell, 1 means toward the right/bottom, and 0.5 means centered.
See styleObj
for information about how a style is specified, and
how it is applied to entries. Note that individual style specifications
(rows) in style
are applied to x
in order. If an entry
matches more than one style
row, the last matching row will
override the earlier ones.
One can also assign or modify graphical properties directly, without using
a style, by editing a prEntries
object like a data frame.
Properties in an existing plot can also be modified using the
props<-
set of functions.
An object of S3 classes prEntries
, tblEntries
, and
data.frame
. It has the same rows and columns as x
(one row
per entry), plus additional or updated columns containing the graphical
properties to use for each entry, plus a column style_row
(the
number of the last row in style
that the entry matched, or NA if it
matched none).
Row names for the data frame are set equal to block id
. The object
has several additional attributes: current_scale
and style
,
based on the scale
and style
arguments after applying
defaults; and mergeRuns
, rowheadInside
, rowhier
, and
colhier
, copied from x
.
elements
documents the descriptors and graphical properties
for blocks. tblEntries
; styleObj
creates
styles; as.prEntries
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.