<style>
.huxtable {
border-collapse: collapse;
border: 0px;
margin-bottom: 2em;
margin-top: 2em;
}
.huxtable-cell {
vertical-align: top;
text-align: left;
white-space: normal;
border-style: solid;
border-width: 0pt;
padding: 6pt;
font-weight: normal;
}
.huxtable-header {
font-weight: bold;
}
</style>
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.