[R] Knitr: setting echo = FALSE globally

Rich Shepard rshepard at appl-ecosys.com
Mon Jul 20 21:35:46 CEST 2015


On Mon, 20 Jul 2015, Yihui Xie wrote:

> Section 5.1.3 of the book "Dynamic Documents with R and knitr" is
> titled "Global Options". I don't know how to make it more clear for
> readers to find information on global options in the book.

   Yes, I've read that and have not found where 'opts_chunk$set(echo =
FALSE)' should be inserted in the document.

   If I put it in the first chunk, outside the options box, pdflatex throws
an error. If it is in it's own chunk, either by itself or in the options
box, there's the same verbose error when trying to compile it. When I put it
in the body of the document it's printed as is.

   Where should that command be entered in the document?

Rich



More information about the R-help mailing list