I have a very long plot code written out in R markdown. I do not want the code to be displayed, but I want to the graphs to be displayed.
I used this advice and have this in my R chunk
```{r, include=FALSE, results="hide", fig.width=8, fig.height=6}
x = c(1:10)
y = c(40:50)
plot(x~y)
````
However, this simply does not give any output on the knitted file. Any suggestions?
Use echo=FALSE, neither results="hide" nor include=FALSE in your chunk options (I think the latter is your real problem). (As @markdly comments below, that means {r, echo=FALSE, fig.width=8, fig.height=6} are the options you want to use.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With