What is the best option or suggested workflow for adding captions to gtsummary tables in Rmarkdown documents?
For examples, I know there's a function for kable tables, so in theory one might convert one into the other using gtsummary::as_kable(), but somehow this doesn't feel optimal. Suggestions?
Thanks!
The gt package has many many functions for controlling how a gt table prints. I suggest you convert the gtsummary object to gt using the
as_gt()function, then continue customizing with gt functions. https://gt.rstudio.com/ Small example included below.