Hi @bradduthie, apologies for missing your Rmarkdown session last week. I've been reading through your notes and having a play with it this morning. However, I'm having trouble inserting plots that I've created previously.
So I have a script that creates a ggplot from a dataset and saves the ggplot object in a variable, e.g. 'wdflp' and also creates a panel of six ggplots using the cowplot package saved in another variable, e.g. 'fig7'. How do I insert these objects into my Rmarkdown script? Everything I've tried comes up with an error when I try to knit it, e.g. 'fig7 not found'. All of the objects are in my global environment.
I'm sure there must be a simple solution, but no amount of scouring the web has provided an answer so far.
Hi @bradduthie, apologies for missing your Rmarkdown session last week. I've been reading through your notes and having a play with it this morning. However, I'm having trouble inserting plots that I've created previously.
So I have a script that creates a ggplot from a dataset and saves the ggplot object in a variable, e.g. 'wdflp' and also creates a panel of six ggplots using the cowplot package saved in another variable, e.g. 'fig7'. How do I insert these objects into my Rmarkdown script? Everything I've tried comes up with an error when I try to knit it, e.g. 'fig7 not found'. All of the objects are in my global environment.
I'm sure there must be a simple solution, but no amount of scouring the web has provided an answer so far.