gridExtra (version 2.0.0)

tableGrob: Graphical display of a textual table

Description

Create a gtable containing text grobs representing a character matrix

Usage

tableGrob(d, rows = rownames(d), cols = colnames(d),
  theme = ttheme_default(), ...)

grid.table(...)

ttheme_default(...)

ttheme_minimal(...)

Arguments

d
data.frame or matrix
rows
optional vector to specify row names
cols
optional vector to specify column names
theme
list of theme parameters
...
further arguments to control the gtable

Value

  • a gtable

Functions

  • tableGrob: return a grob
  • grid.table: draw a text table
  • ttheme_default: default theme for text tables
  • ttheme_minimal: minimalist theme for text tables

Examples

Run this code
library(grid)
d <- head(iris, 3)
g <- tableGrob(d)
grid.newpage()
grid.draw(g)

Run the code above in your browser using DataLab