Reputation: 11
I'm trying to knit my r file to html and have the tables/graphs/certain outputs showing, but not the code chunks. So far I have been successful with using echo = FALSE or include = FALSE in the start of the code chunk, but in my assumptions graphs the code messages that pop up are being knitted when I don't want them to be. echo=FALSE shows the graphs along with the messages (which i don't want) include=FALSE gets rid of the messages, but also gets rid of the graphs that i need to show. Is there any way around this? I have attached example pictures to demonstrate. Thanks!
Upvotes: 1
Views: 1083
Reputation: 17
Near the top you should see the code
knitr::opts_chunk$set(checo = TRUE)
You can add warning = FALSE at the end:
knitr::opts_chunk$set(echo = TRUE, warning = FALSE)
At the very top where it says output: you can also do this
output:
html_document:
code_folding: hide
This gives the option to show the code if someone wants to see it, but will hide it initially.
Upvotes: 1