I have a loop running for 50 patients. In it, I produce plot_i and table_i. I need plot_1 and table_1 on page 1 of a pdf, plot_2 and table_2 on page 2, etc. The plot is produced using base r, not ggplot2, so grid.arrange does not work. When I try to use par and layout, it only picks up on the plots, not tables. How do I specify to layout/par that I need the plot AND the table, or is there another function that would work?
I tried using layout/par but it just picks out two plots for each page, and ignores the tables. I want something that does what grid.arrange(plot_i, table_i) would do.
