Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

huxtable-package

Quick introduction to huxtable


Description

Huxtable is a package for creating HTML and LaTeX tables. It provides similar functionality to xtable, with a simpler interface.

Quick start

To create a huxtable object, use huxtable() or as_huxtable():

library(huxtable)
 employees <- huxtable(
         Names    = c("Hadley", "Yihui", "Dirk"),
         Salaries = c(1e5, 1e5, 1e5),
         add_colnames = TRUE
       )
 car_hux <- as_hux(mtcars)

You can then set properties which affect how the huxtable is displayed:

# make the first row bold:
 bold(employees)[1, ] <- TRUE

 # change the font size everywhere:
 font_size(employees) <- 10

Or you can use a tidyverse style with the pipe operator:

library(magrittr)
employees <- employees %>%
      set_font_size(10) %>%
      set_bold(1, everywhere, TRUE)

For more information, see the website or read the vignette with vignette('huxtable').

See huxtable-FAQ for frequently asked questions, including ways to get help.

To report a bug, or suggest an enhancement, visit github.


huxtable

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

v5.3.0
MIT + file LICENSE
Authors
David Hugh-Jones [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.