
Emmanuel T. answered 11/11/22
University Professor Specializing in Politics and Data Science
Check out Quarto (the new version of R Markdown). It has enhanced support for markdown tables.
I don't know if there is a way, however, to just print a dataframe into a markdown table. I have not seen that. Most people would use something like the `jtools` or `gt` (or like you mentioned `xtable`) to build their tables and then knit (now 'render') the document. However, the tables from those packages look pretty good in the context of quarto document which is based on pandoc markdown and can be converted into virtually any format you can think of.