I am working on a vignette for an R package where I want to show how to do the same thing in two R packages. My preferred approach would be to include several tables, where I can show the appropriate code next to each other, something like so:
I don't care about the exact fonts, but I would like to see the R code laid out nicely and clearly, like it would be in a regular rmarkdown chunk, but then in a cell of a table.
Is there a way to achieve something like this in rmarkdown?
(I imagine it can by done by typing html directly, but that would be very cumbersome because I don't know html very well.)