suppress console output in r markdown, but keep plot
Wrapping any object in invisible
will prevent automatically print
ing it.
You should be able to use
invisible(lapply(obj,function(x) plot(x,main="some plot")))
However the fact that echo=FALSE
doesn't work suggests that there might be something else going on.
try this:
{r, echo=FALSE,results='hide',fig.keep='all'}
lapply(obj,function(x) plot(x,main="some plot") box() axis(1,at=seq(0,25,by=1))