The time needed to knit my markdown document with pdf output makes me crazy. Is there any way to accelerate the plotting and arranging of plots? ggarrange
seems already faster than grid.arrange
from what i can see.
data=1:5
df <- data.frame(data)
myplot <- ggplot(df)+geom_line(aes(x=data, y = data))
microbenchmark(grid.arrange(myplot, myplot), ggarrange(myplot, myplot), times=3)
Unit: milliseconds
expr min lq mean median uq max neval
grid.arrange(myplot, myplot) 107.0948 117.6475 153.5636 128.2002 176.7980 225.3959 3
ggarrange(myplot, myplot) 49.5275 49.5631 120.6860 49.5987 156.2653 262.9318
ggsave()
and then import it into the text body, it can help. Additionally, consider svglite depending upon whether you're using raster or vector images. – Stalingradcache=TRUE
might help you out as well. – Scapolite