View source: R/plot.prTable.bare.R
plot.prTable | R Documentation |
prtable
Objects A plot method for prTable
objects, to display tables using
ggplot2
graphics. This is an internal function, not intended to be
called by package users.
## S3 method for class 'prTable'
plot(x, plot.margin=tablesggOpt("plot.margin"), sizeAdjust=c(1.0,
1.0), ...)
x |
A |
plot.margin |
Numeric vector of length 4, giving the amount of padding to be added outside the top, right, bottom, and left sides of the table, in millimeters. |
sizeAdjust |
Two-element numeric vector containing multipliers to adjust the calculated absolute size of table text. The first element is applied to the horizontal dimension and the second to the vertical dimension. See DETAILS. |
... |
Other arguments, ignored with a warning. (Included for compatibility with
the |
The implicit coordinate system for the plot is in millimeters, with the
origin at the upper left corner of the _table_ (which may differ from the
upper left corner of the plot due to plot.margin
), and
y-coordinates increasing downward. All sizes and dimensions are in
millimeters except font size, which is in points.
The print method for pltdTable
objects attempts to draw the table
at its natural size, as given by attribute size_mm
. (Function
pltdSize
provides convenient access to this attribute, in
user-controllable units.) However the calculated size depends slightly on
the graphics device being used (see ?Devices
). sizeAdjust
may be used to compensate for this difference when a plotted table object
created using one device is to be displayed with a different one.
This function checks the enabled
field of the entries
,
blocks
, and hvrules
components of x
. Elements for
which enabled
is FALSE are not displayed, and their size is treated
as 0 when laying out the table.
An object of S3 class pltdTable
, inheriting from ggplot
.
(However if x
has no enabled entries to plot, the returned value is
NULL, with a warning.) There is a print (display) method for this class,
or the object can be modified in the usual ggplot
way before
display.
The object has attributes plot.margin
and sizeAdjust
(equal
to the arguments), and size_mm
(the width and height of the plot,
in millimeters). size_mm
is calculated after applying
sizeAdjust
, and includes both the table and any margins specified
by plot.margin
.
The object also has attributes colBoundaries
and
rowBoundaries
giving the coordinates of the boundaries between
columns and between rows, again in mm, and after applying
sizeAdjust
.
The object also has attribute prTable
, the plot-ready table object
x
. This is to allow convenient updating of the display properties
of the table.
prTable
, pltdSize
,
print.pltdTable
, Devices
,
calc_rcsize
, coord_justif
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.