I will be pretty straight forward with my question, as can be seen here it is possible to get an LaTeX output from gtsummary
objects with as_gt()
, gt::as_latex()
and a pipe.
Is it possible to do the same but to get an r markdown style code?.
I need this because I would probably need to do some minor editing to the tables and because this way I can knit them in *.pdf or *.docx
By "r markdown style code" I mean that I would like an output in the console that looks something like this, so I can paste it in some R Markdown document and format it even further:
| **Grupos de edad** | **Abril** | **Mayo** | **Junio** | **Julio** |
|--------------------:|----------:|---------:|----------:|----------:|
| **18 a 24** | 5.72% | 5.97% | 6.83% | 5.37% |
| **25 a 39** | 44.45% | 40.19% | 36.75% | 42.41% |
| **40 a 59** | 41.04% | 44.21% | 47.15% | 42.26% |
| **60 o más** | 8.78% | 9.35% | 8.80% | 9.54\$ |
| **No especificado** | 0.0% | 0.28% | 0.47% | 0.43% |
| **Total** | 100.0% | 100.0% | 100.0% | 100.0% |
| n | 4572879 | 3966146 | 4459403 | 3529408 |
| | | | | |