I am using Rmarkdown to automate generating a bunch of plots. I have code like:
```{r make_plots}
for (a_ggplot in a_bunch_of_ggplots()) {
print(a_ggplot)
}
```
I'd like to make the plots different heights. Normally I'd set the height with fig.height
in the chunk header. I tried using a vector for fig.height
without success. (I think it just used the last value.)
How do I make the plots different heights?
Also, I'll want to add some document headers. I'm planning on trying technique from this answer (generating raw markdown and using results='asis'
). Bonus points if your solution is compatible with it!
EDIT: Perhaps I could ggsave
the plots as images, then use include_graphics. Seems hacky. Worse, it'll rasterize them so they can't be zoomed in on. But, it's a thought.