[R] KnitR/RMarkdown: Is there a way to not print a section of the document?

2014-01-27 Thread Jeff Johnson
I've been looking through the R documents to see if there's a way to not output certain chunks of code. I'm trying to present a document to a team of folks that won't necessarily be interested in the line-by-line code, though they are interested in the charts, etc. Thus, I'd like to not output

Re: [R] KnitR/RMarkdown: Is there a way to not print a section of the document?

2014-01-27 Thread Luke Miller
In the chunk options, you can use the argument echo = FALSE to suppress display of the R code in the output. echo = FALSE= # R code @ This will still print out results from R that would be sent to the command line (like print() statements, cat() statements, results from summary(), etc), but the

Re: [R] KnitR/RMarkdown: Is there a way to not print a section of the document?

2014-01-27 Thread Duncan Mackay
Hi I use Sweave and have a master Rnw file and parent files. If there are large chunks I split them up and then just put a % in front of the \SweaveInput if unwanted. Otherwise I split up the tex files with \input and \includeonly You could get into the chunk options and change things there but

Re: [R] KnitR/RMarkdown: Is there a way to not print a section of the document?

2014-01-27 Thread Yihui Xie
Similarly, you can split a large input document into child documents in knitr, e.g. chap1, child=chap1.Rnw= @ You can comment out this chunk when you do not need it. Or control it programmatically, setup, include=FALSE= include_me = TRUE # or FALSE @ chap1, child=if (include_me)