Easily Create and Style Tables for LaTeX, HTML and Other Formats

Creates styled tables for data presentation. Export to HTML, LaTeX, RTF, 'Word', 'Excel', 'PowerPoint', 'typst', SVG and PNG. Simple, modern interface to manipulate borders, size, position, captions, colours, text styles and number formatting. Table cells can span multiple rows and/or columns. Includes a 'huxreg' function to create regression tables, and 'quick_*' one-liners to print tables to a new document.


h

u

X

t

a

b

l

e


R-universeBadge CRAN StatusBadge CRAN Downloads PerMonth R buildstatus CoverageStatus

Huxtable is an R package to create styled tables in multiple output formats, with a friendly, modern interface. Features include:

  • Control over text styling, number format, background colour, borders, padding and alignment.
  • Table cells can span multiple rows and/or columns.
  • Table manipulation via common dplyr functions.
  • Automatic formatting for rmarkdown and quarto documents.
  • huxreg() function for quick creation of regression tables.
  • Output to HTML, LaTeX, RTF, and Microsoft Word/Excel/Powerpoint, using the officer and openxlsx packages.
  • Output to PDF, PNG and SVG formats using typst.
  • Quick one-liners to print data frames into any supported format.
  • Formatted table display in the R console, including borders, colour, and text styles.

Installing

To install from r-universe:

install.packages("huxtable", repos = c(
  "https://hughjonesd.r-universe.dev",
  "https://cloud.r-project.org"
))

To install from CRAN:

install.packages("huxtable")

To install the latest version from github:

install.packages("remotes")
remotes::install_github("hughjonesd/huxtable")

Learning more

Check out the website, read the documentation or read the vignette.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("huxtable")

6.0.2 by David Hugh-Jones, 18 days ago


https://hughjonesd.github.io/huxtable/, https://github.com/hughjonesd/huxtable


Report a bug at https://github.com/hughjonesd/huxtable/issues


Browse source code at https://github.com/cran/huxtable


Authors: David Hugh-Jones [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports assertthat, base64enc, commonmark, fansi, generics, glue, htmltools, memoise, R6, rlang, stats, stringi, stringr, tidyselect, utils, xml2

Suggests AER, bookdown, broom, broom.mixed, covr, crayon, devtools, dplyr, flextable, ftExtra, ggplot2, httr, knitr, lme4, lmtest, nlme, nnet, officer, openxlsx, psych, quarto, rmarkdown, sandwich, scales, styler, testthat, tibble, tinytex

System requirements: LaTeX packages: adjustbox, array, calc, caption, colortbl, fontspec, graphicx, hhline, hyperref, longtable, multirow, siunitx, tabularx, threeparttable, threeparttablex, ulem, wrapfig


Imported by experiences, pharmaRTF, spatialRF, surveytable, tidytlg, uxr.

Depended on by RSStest, homnormal, pubh.

Suggested by Tplyr, accessr, brickster, expss, formatters, glmmTMB, gtsummary, interactions, ipsRdbs, jtools, modelsummary, raretrans, texreg.


See at CRAN