For documentary purposes, I want some code for a plot in the html-output, but not the plot. Later, I have to call the plotting code, and add something to the plot, but only
Chunk references in <<>>
do not respect chunk options, so <<non.finished.plotting, echo=FALSE>>
will not work. What you can do is to move the chunk option echo
back to the main chunk like this:
```{r add.layer, fig.width=5, fig.height=5, echo=-1}
<<non.finished.plotting>>
points(x=rnorm(100,1,0.1), y=rnorm(100,0.8,0.1) )
```
echo=-1
means do not echo the first expression (as documented). This is probably what you want: