13.3 Extension packages

Although kable offers flexible tables within R Markdown documents, you may wish to extend the functionality of tables using other packages. There are several packages which have been developed to create tables in R Markdown:

  • stargazer (Hlavac 2018)
  • gt (Iannone, Cheng, and Schloerke 2019)
  • flextable (Gohel 2020)

These packages are explained in the following subsections.

13.3.1 stargazer


13.3.2 gt


13.3.3 flextable

This package is developed by David Gohel and is part of the officer package suits.

flextable aims at easily creating tables for reporting to be embedded within:

  • R Markdown documents with support for HTML, Word and PowerPoint documents.
  • Microsoft Word or PowerPoint documents directly.


Gohel, David. 2020. Flextable: Functions for Tabular Reporting. https://CRAN.R-project.org/package=flextable.

Hlavac, Marek. 2018. Stargazer: Well-Formatted Regression and Summary Statistics Tables. https://CRAN.R-project.org/package=stargazer.

Iannone, Richard, Joe Cheng, and Barret Schloerke. 2019. Gt: Easily Create Presentation-Ready Display Tables. https://github.com/rstudio/gt.