Hiding the R code in Rmarkdown/knit and just showing the results
Might also be interesting for you to know that you can use:
{r echo=FALSE, results='hide',message=FALSE}
a<-as.numeric(rnorm(100))
hist(a, breaks=24)
to exclude all the commands you give, all the results it spits out and all message info being spit out by R (eg. after library(ggplot) or something)
Sure, just do
```{r someVar, echo=FALSE}
someVariable
```
to show some (previously computed) variable someVariable
. Or run code that prints etc pp.
So for plotting, I have eg
### Impact of choice of ....
```{r somePlot, echo=FALSE}
plotResults(Res, Grid, "some text", "some more text")
```
where the plotting function plotResults
is from a local package.