Builds a table with a title/caption and simple top/bottom/header rules
(booktab style), based on gridExtra::tableGrob().
Usage
card_table(
x,
theme = poster_theme(),
title = NULL,
caption = NULL,
rows = NULL,
width = NULL
)Arguments
- x
A data.frame or tibble.
- theme
A
poster_theme()object.- title
Optional title text drawn above the table.
- caption
Optional caption text drawn below the table.
- rows
Passed to
gridExtra::tableGrob();NULL(default) hides row names.- width
Target width, as a grid::unit or millimetres. If the table is naturally wider, its font size is shrunk to fit (with a final clip as a safety net).
NULLleaves the table at its natural size.
Value
A grob suitable as the body argument of poster_card().
Examples
g <- card_table(head(iris), poster_theme(), title = "Iris")