Huxtable is a package for creating HTML and LaTeX tables. It provides similar functionality to xtable, with a simpler interface.
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)
See huxtable-FAQ for frequently asked questions, including ways to get help.
To report a bug, or suggest an enhancement, visit github.