Create a gtable containing text grobs representing a character matrix.
tableGrob(d, rows = rownames(d), cols = colnames(d),
theme = ttheme_default(), vp = NULL, ...)grid.table(...)
ttheme_default(base_size = 12, base_colour = "black", base_family = "",
parse = FALSE, padding = unit(c(4, 4), "mm"), ...)
ttheme_minimal(base_size = 12, base_colour = "black", base_family = "",
parse = FALSE, padding = unit(c(4, 4), "mm"), ...)
data.frame or matrix
optional vector to specify row names
optional vector to specify column names
list of theme parameters
optional viewport
further arguments to control the gtable
default font size
default font colour
default font family
logical, default behaviour for parsing text as plotmath
length-2 unit vector specifying the horizontal and vertical padding of text within each cell
A gtable.
tableGrob
: return a grob
grid.table
: draw a text table
ttheme_default
: default theme for text tables
ttheme_minimal
: minimalist theme for text tables
# NOT RUN {
library(grid)
d <- head(iris, 3)
g <- tableGrob(d)
grid.newpage()
grid.draw(g)
# }
Run the code above in your browser using DataLab