[ESS] knitr

Stephen Eglen S.J.Eglen at damtp.cam.ac.uk
Wed Oct 3 11:05:12 CEST 2012


> There is 100% guarantee for *.Rnw documents; one thing I can think of
> is to see if opts_chunk is used in the document, e.g.
> opts_chunk$set(echo = TRUE). This is unique to knitr. Other minor
> differences are like results='hide' (knitr) vs results=hide (Sweave).
>
> If a document uses \usepackage{Sweave}, it is more likely to be Sweave
> because knitr does not need this. The other approach is to check if
> (require('knitr')) in R before weaving the file.

Thanks Yihui.  (Is the word "no" missing before the 100% in your first
sentence?)

Stephen



More information about the ESS-help mailing list