These functions print or return an HTML table.
print_html(ht, ...)
to_html(ht, ...)
print_notebook(ht, ...)
# S3 method for huxtable
to_html(ht, ...)
A huxtable.
Arguments to pass to methods. Not currently used.
to_html
returns an HTML string. print_html
prints the string and returns NULL
.
print_notebook
prints HTML output suitable for use in an
RStudio interactive notebook.
Other printing functions:
print_latex()
,
print_md()
,
print_rtf()
,
print_screen()
ht <- hux(a = 1:3, b = letters[1:3])
to_html(ht)
#> [1] "<table class=\"huxtable\" data-quarto-disable-processing=\"true\" style=\"border-collapse: collapse; border: 0px; margin-bottom: 2em; margin-top: 2em; ; margin-left: auto; margin-right: auto; \">\n<col><col><tr>\n<th style=\"vertical-align: top; text-align: right; white-space: normal; border-style: solid solid solid solid; border-width: 0pt 0pt 0pt 0pt; padding: 6pt 6pt 6pt 6pt; font-weight: normal;\">a</th><th style=\"vertical-align: top; text-align: left; white-space: normal; border-style: solid solid solid solid; border-width: 0pt 0pt 0pt 0pt; padding: 6pt 6pt 6pt 6pt; font-weight: normal;\">b</th></tr>\n<tr>\n<td style=\"vertical-align: top; text-align: right; white-space: normal; border-style: solid solid solid solid; border-width: 0pt 0pt 0pt 0pt; padding: 6pt 6pt 6pt 6pt; font-weight: normal;\">1</td><td style=\"vertical-align: top; text-align: left; white-space: normal; border-style: solid solid solid solid; border-width: 0pt 0pt 0pt 0pt; padding: 6pt 6pt 6pt 6pt; font-weight: normal;\">a</td></tr>\n<tr>\n<td style=\"vertical-align: top; text-align: right; white-space: normal; border-style: solid solid solid solid; border-width: 0pt 0pt 0pt 0pt; padding: 6pt 6pt 6pt 6pt; font-weight: normal;\">2</td><td style=\"vertical-align: top; text-align: left; white-space: normal; border-style: solid solid solid solid; border-width: 0pt 0pt 0pt 0pt; padding: 6pt 6pt 6pt 6pt; font-weight: normal;\">b</td></tr>\n<tr>\n<td style=\"vertical-align: top; text-align: right; white-space: normal; border-style: solid solid solid solid; border-width: 0pt 0pt 0pt 0pt; padding: 6pt 6pt 6pt 6pt; font-weight: normal;\">3</td><td style=\"vertical-align: top; text-align: left; white-space: normal; border-style: solid solid solid solid; border-width: 0pt 0pt 0pt 0pt; padding: 6pt 6pt 6pt 6pt; font-weight: normal;\">c</td></tr>\n</table>\n"