rlatexhuxtable

Save huxtable in R to file in LaTex format


How can I save a huxtable to a file in LaTeX (.tex) format? I did find this code to print LaTeX tables to the console:

library(huxtable)
ht <- huxtable(
        a = 1:3,
        b = letters[1:3]
      )
print_latex(ht)

Does the huxtable package have a native way to save the table to disk or do we need a workaround?


Solution

  • The huxtable package has a function to do that: quick_latex(ht, file = "Table.tex", open = FALSE).