library(huxtable)
knitr::opts_chunk$set(echo = FALSE)

Section with Huxtable Table

head(iris) |> as_huxtable() |> set_caption('This is a table that should be numbered.')

Table \@ref(tab:iris) is cross-referenced.

Section with Huxtable Table and Manual Label

head(iris) |> as_huxtable() |> set_caption('This is a table that should be numbered.') |> set_label('tab:foobar')

Table \@ref(tab:foobar) is cross-referenced.

Section with Kable Table

head(iris) |> knitr::kable(caption = 'This is a table that should be numbered.')

Table \@ref(tab:iris-kable) is cross-referenced.

Section with Figure

You can also embed plots, for example:

plot(pressure)

Figure \@ref(fig:pressure) is cross-referenced.



hughjonesd/huxtable documentation built on Feb. 17, 2024, 12:20 a.m.