On Mon, 20 Jul 2015, John Kane wrote:

I have no idea wha that chunk is not working but I think you can get the
same result using the old method Stick the following in an ERT box:

<<set-ops, echo = FALSE>>=
opts_chunk$set(echo = FALSE)
@

John,

  My original response was too large (3 attached PDF files) and was held for
moderator approval which is no longer needed.

  I found the magic solution; looks awkward, but it works.

  Near the top of the document (well before any R code) I insert a knitr
chunk containing the directive, opts_chunk$set(echo=FALSE). This is
immediately followed by an ERT box as above. The double whammy prevents R
code from echoing ... except for the contents of the leading chunk itself.

  Adding the option, echo=FALSE, to that leading chunk prevents it from
displaying.

  Note that both the chunk with opts_chunk$set() and the ERT is required to
prevent R code from displaying. No chunk but ERT box does not stop the
echoing.

Thanks for the pointer,

Rich

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to