Hi, I am trying to knit a PDF in which I should plot some figures created using ggplot2.
Usually, I plot figures using this script
```{r pressure, echo=FALSE}
plot(pressure)
Now, I would like to plot on a PDF a ggplot figure that I created and named in a work script.r
I tryed this way:
```{r chlorophyll, echo=FALSE}
require(ggplot2)
gg1
then, the PDF is not created and I have an error:
Error in eval(expr, envir, enclos) : object 'gg1' not found
Calls: <Anonymous> ... handle -> withCallingHandlers -> withVisible -> eval -> eval
Execution halted
How can I ask Markdown to plot ggplot figures I have already created?
Thank you