Controlling knitr output
You can control what is output from code chunks by changing knitr options. options are described here in detail.
Below some of the options I most use are shown.
eval=FALSE will turn the code evaluation off. The code still will be shown.
You can supress warnings in the code output by setting
You can suppress messages from the code by setting
message=FALSE for the R chunk.
Evaluate code but hide figures
You can also execute code but hide the figures with
fig.show='hide' option for the R chunk.