toTinytable | R Documentation |
tabular
object to tinytable
format.
Converts the output of the tabular
and related
functions to a format consistent with the output of the
tt
function, so that it can be
customized using the tinytable package.
toTinytable(table, ...)
table |
An object of class |
... |
Additional arguments to pass to |
An object of class tinytable
, suitable for passing
to functions in the tinytable package. These tables
can be exported to several formats, including LaTeX, HTML,
Markdown, Word, Typst, PDF, and PNG.
tinytable-package
if (requireNamespace("tinytable")) {
tab <- tabular( (Species + 1) ~ (n=1) + Format(digits=2)*
(Sepal.Length + Sepal.Width)*(mean + sd), data=iris )
tab <- toTinytable(tab, theme = "striped")
tab <- tinytable::style_tt(tab, i = 1:2, background = "teal", color = "white")
tab
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.