Learn R Programming

⚠️There's a newer version (5.6.0) of this package.Take me there.

Huxtable is an R package for creating HTML and LaTeX tables. It provides similar functionality to xtable, but does more, with a simpler interface. Features include control over text styling, number format, background color, borders, padding and alignment. Cells can span multiple rows and/or columns. Tables can be manipulated with standard R subsetting or dplyr functions. Huxtable includes a huxreg() function for quick creation of regression tables, and allows output to Microsoft Word or Powerpoint using the officer package.

Installing

To install from CRAN:

install.packages('huxtable')

To install from github:

install.packages('devtools')
devtools::install_github('hughjonesd/huxtable')

Learning more

Check out the website, read the documentation or read the vignette in HTML or PDF.

Copy Link

Version

Install

install.packages('huxtable')

Monthly Downloads

8,928

Version

1.2.0

License

MIT + file LICENSE

Maintainer

David Hugh-Jones

Last Published

December 17th, 2017

Functions in huxtable (1.2.0)

background_color

Background color
add_footnote

Add a row with a footnote
bold

Cell text style
add_colnames

Add column or row names
caption

Caption
caption_pos

Caption position
font_size

Font size
get_default_properties

Get default huxtable properties
align

Alignment
as_FlexTable

Convert a huxtable for Word/Powerpoint
cbind.huxtable

Combine rows or columns
huxtable-package

Huxtable: simply create LaTeX and HTML tables
col_width

Column widths
huxtable

Create a huxtable
final

Return the last n rows or columns
font

Font
report_latex_dependencies

Report LaTeX dependencies
guess_knitr_output_format

Guess knitr output format
rotation

Text rotation
height

Table height
set_cell_properties

Set multiple cell properties
insert_column

Insert a row or column
is_a_number

Does an object look like a number?
set_default_properties

Set default huxtable properties
left_padding

Cell padding
themes

Theme a huxtable
na_string

NA string
print_html

Create HTML representing a huxtable
number_format

Number format
pad_decimal

Decimal padding
print_screen

Print a huxtable on screen
rowspecs

Row and column specifications
valign

Vertical alignment
sanitize

Sanitize table elements
where

Return array indices where expression is true
escape_contents

Escape cell contents
every

Return every n row or column numbers
width

Table width
label

Table label
latex_float

Float position for LaTeX
[.huxtable

Subset a huxtable
filter

Pointless documentation
left_border

Borders
hux_logo

Huxtable logo
huxreg

Create a huxtable to display model output
left_border_color

Border colors
wrap

Text wrapping
set_all_border_colors

Set all border colors
colspan

Column span
mutate.huxtable

Dplyr verbs for huxtable
set_all_borders

Set all borders
set_outer_borders

Set outer borders round a rectangle of cells
print_latex

Create LaTeX representing a huxtable
t.huxtable

Transpose a huxtable
tabular_environment

Tabular environment
print_md

Create Markdown representing a huxtable
text_color

Text color
position

Table position
print.huxtable

Default print method for huxtables
row_height

Row heights
rowspan

Row span