Learn R Programming

ggplot2 (version 0.9.1)

gtable: Create a new table grid.

Description

A table grid captures all the information needed to layout grobs in a table structure. It supports row and column spanning, and offers some tools to automatically figure out correct dimensions.

Usage

gtable(grobs = list(), layout = NULL, widths = list(),
    heights = list(), respect = FALSE, name = "layout")

Arguments

grobs
a list of grobs
layout
a data frame with one row for each grob, and columns t, r, b, l giving top, right, bottom and left positions respectively, clip a string, either "on", "off" o
widths
a unit vector giving the width of each column
height
a unit vector giving the height of each row
respect
a logical vector of length 1: should the aspect ratio of height and width specified in null units be respected. See grid.layout for more details
name
a string giving the name of the table. This is used to name the layout viewport

Details

Each grob is put in its own viewport - grobs in the same location are not combined into one cell. Each grob takes up the entire cell viewport so justification control is not available.

It constructs both the viewports and the gTree needed to display the table.