Renders the table data for direct inclusion in RMarkdown,
Quarto, or HTML reports, wiring the caption and note slots
into the standard APA placement (caption above, note below).
When kableExtra is installed the note is attached as a footer for HTML or
LaTeX. Otherwise the complete rendered table is collapsed to one
knitr_kable string before a single note is appended.
Arguments
- x
An
apa_tableobject fromapa_table().- format
One of
"pipe"(default, Markdown),"html", or"latex", passed through toknitr::kable().- digits
Numeric; passed to
knitr::kable().- ...
Additional arguments forwarded to
knitr::kable().
Value
A knitr_kable object ready to be printed inline in a
report, or a message when knitr is unavailable.
Examples
tbl <- structure(
list(
table = data.frame(Term = c("Rater A", "Rater B"), Estimate = c(-0.12, 0.18)),
caption = "Facet estimates",
note = "Toy values for formatting only."
),
class = "apa_table"
)
if (requireNamespace("knitr", quietly = TRUE)) {
invisible(as_kable(tbl))
}
