add.grid.table: Print tables or text in a grid object

View source: R/add.grid.table.R

add.grid.tableR Documentation

Print tables or text in a grid object

Description

These functions take an array of values and labels or an array of text and add it to one or many grid viewports in an orderly fashion.

Usage

add.grid.table(
  txt,
  col.nams = NULL,
  ystart,
  xstart = unit(0, "npc"),
  start.pt = 1,
  vp,
  vp.num = 1,
  minrow = 5,
  cell.padding = 0.5,
  mult.col.padding = 1,
  col.optimize = TRUE,
  equal.widths = FALSE,
  space.before.table = 1,
  center.table = FALSE,
  use.rect = FALSE,
  fill.type = NULL,
  fill.col = "grey",
  cell.lines.lty = 0,
  ...
)

Arguments

txt

The text or table values to add to the grid object.

col.nams

the column names of the table values

ystart

The y location to start printing in the grid viewport

xstart

The x location to start printing in the grid viewport

start.pt

The start point (row) in the table array to start printing

vp

The viewport(s) to add the table or text to

vp.num

the viewport number in vp to start printing to

minrow

The minimum rows before printing more columns to use in the table

cell.padding

padding between cells in the table

mult.col.padding

padding between multiple columns in the table

col.optimize

should we column optimize (TRUE) or row optimize (FALSE)

equal.widths

Should all columns have equal widths

space.before.table

Should there be a space before the table

center.table

should we center the table in the viewport?

use.rect

Should we make rectangles with background color around the table entries TRUE or FALSE

fill.type

Which rectangles should be filled. Allowed values are "all", "top", "side", "both" and NULL.

fill.col

The color of the filled rectangles

cell.lines.lty

The line-type for the lines between the cells, using the same values as lty.

...

Other arguments passed to the various functions.

Value

A List is returned with the following components

ystart

new starting point for new text

stop.pt

null if everything gets printed

vp.num

the viewport needed for next text printed

xpose.table

A grob object that can be plotted.

Author(s)

Andrew Hooker

See Also

runsum, grid.text


xpose4 documentation built on May 31, 2022, 5:07 p.m.