In our production environment, we use gtsummary package to summarize large data, then convert to gt object to add title and subtitle. The visual quality of the resulting table is unparalleled.
However, in many instances we need this summary table accompanied by a companion data table that carries detail of a handful of outliers or similar specifics that clarify the overall. In a sense, this companion data is a table-based footnote, or clarifying support information.
Because we emit large numbers of these summaries, I am looking for a way to keep them together in the same emitted single-page pdf.
I've tried to solve this with the following:
- tbl_merge, tbl_stack in gtsummary: gtsummary tables, not gt objects, requires shared rows or columns.
- gridExtra: gt objects cannot be converted to grobs
- pdf() or print to device: gtsave or print(gt) does not output to device.
Does anyone know if there is there a way to embed one table as a png object in the footnote of the other? Or is there another alternative?