rmarkdown
rmarkdown copied to clipboard
Consider adding "gt" as an available `df_print` option
gt::gt()
has and will have many accessibility benefits as opposed to other df_print
methods, such as knitr::kable()
, etc. Although it's possible to customize knitr::knit_print.data.frame
s3 method, it would be more convenient for users to have an option to choose gt
for their df_print
method. Additional benefit is that gt
can be used for html, latex, word, and rtf, altogether.
Thanks ! That is a good idea. df_print
feature is quite simple and gt offers a lot a feature to customize table. So I don't know what would be a simple default GT table that df_print
could offer.
I believe gt user are more at ease by directly customizing their tables.
Anyway, I like the idea and we'll think about it. cc @rich-iannone
By the way, you can already pass custom function to df_print
: https://bookdown.org/yihui/rmarkdown/html-document.html#custom-fun-dfprint
Did you try something with this already ?
FYI, the following does not produce gt table:
---
title: test
output:
html_document:
df_print: !expr gt::gt
---
```{r}
head(iris)
```