I have a general question about the functionality of grid.arrange
(gridExtra
) and possible improvement potentials. Using an R Shiny app, I display various outputs (ggplot2
, textgrob
, rasterGrob
) via a grid.arrange
. During execution, however, data changes, making it necessary to update individual elements. But executing the whole grid.arrange
takes a lot of time.
Is there a more streamlined way to avoid calculating the whole grid.arrange
each time a single objects changes? Or to implement my problem in a different way? Is it perhaps possible to "cache" the individual elements to then speed up the output when one object is changed? The implementation by grid.arrange
was necessary so far to align the different objects perfectly, but ~10 seconds waiting time is very long.
I am grateful for any advice!