kableExtra Package Table Styling and Formatting Manual

R package for enhancing kable() tables with pipe syntax, footnotes, headers, and styling options for HTML and LaTeX.


kableExtra Package Table Styling and Formatting Manual - cover page
Brand
kableExtra
Category
Other software
Document type
User Manual
Language
English
Pages
49
File format
PDF
File size
187 KB
Published
03 November, 2026
Updated
03 November, 2026
MD5 checksum
2F81FFD192DF92C7004DEAF2AE10918F

About this manual

kableExtra extends knitr's kable() function to allow users to customize HTML and LaTeX tables using a piped syntax. It adds features like footnotes, header rows, cell styling, and image rendering without requiring raw code. The package supports both formats and simplifies complex table creation for R users.

Functions are designed to be intuitive and reusable, with unified behavior across HTML and PDF outputs. Users can apply styles, add annotations, and format cells with minimal code, making it ideal for data presentation in reports and publications.

What's inside

  • add_footnote
  • add_header_above
  • add_indent
  • as_image
  • auto_index
  • cell_spec
  • collapse_rows
  • column_spec
  • footnote
  • group_rows

Frequently asked questions

How do I add footnotes to a kable table?

Use the add_footnote() function with the kable output and a vector of footnote labels. You can choose notation style (number, alphabet, symbol, none).

Can I align table headers differently?

Yes, use add_header_above() with parameters like bold, italic, align, color, and background to customize header appearance.

How do I convert a table to an image?

Use as_image() to render the table as a PNG file, which can be included in R Markdown documents with knitr::include_graphics.

Download PDF (187 KB)