The bookdown
package allows you to compile PDF documents with table numbers and cross references. To do this, you must include a title in your table, use the \@ref{tab:name}
construct, and give a name to the R
chunk where modelsummary
is called.
For example, see Table \@ref(tab:test).
library(modelsummary) mod <- lm(hp ~ mpg, mtcars) modelsummary(mod, title = '(#tab:test) This title describes the content of this table.')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.