[ESS] knitr

Yihui Xie xie at yihui.name
Wed Jun 6 17:22:03 CEST 2012

Well, obviously I do not have a strong desire to try to learn org-mode
again; I just tried to look at the documentation one more time, and I
think I get the idea more or less. Org-babel is another monster, and I
do not have time to spend on it at the moment.

One thing that I worked hard on knitr is that you do not have to set
any chunk options, and you will still get everything just as if you
pasted the code in R. No need for :file or :results. If your R code
produces plots, all of them will be captured and written in the
output. With editor support like RStudio/LyX/Eclipse/..., all you need
to do is write text mixed with code, and hit the button. This is
hopefully easier for beginners to start with. I'm not sure how high is
the barrier of Emacs + Org-mode + LaTeX.

Sorry that sounds to be off-topic. For the integration of org-mode and
knitr, I guess there is at least one difficulty because they have
different philosophies in terms of code block options -- knitr treats
these options as R code, e.g. you can set fig.width=5+2-1 and knitr
will evaluate the option to get 6; Sweave and org-mode treats them as
normal character strings. Finally one knitr user ended up with this
"cheating" solution: http://yihui.name/knitr/demo/org/

So I'd love to see the knitr support in ESS just like the support to
Sweave and leave org-mode alone at the moment. Thanks!

Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA

On Tue, Jun 5, 2012 at 5:59 PM, Stephen Eglen <S.J.Eglen at damtp.cam.ac.uk> wrote:
> Thanks; this confirms what I thought, that markdown is streamlined.
> I did also find org mode quite complicated, as when I started using it,
> it was already quite a fully-featured machine.  I started by learning
> some small aspects first, and then gradually expanding.  I don't know if
> it helps you, but I wrote some org-babel material last year for the ESS
> tutorial at useR last year:
> http://www.damtp.cam.ac.uk/user/sje30/ess11/index.html
> If it looks like there is interest in combining org with knitR, then
> this might be a good place to discuss it (or the org-mode list, as there
> are quite a few users there who use R).
> My approach to learning org mode was to start simple, with one feature
> at a time.  Did you recall if there was anything in particular that you
> had difficulty getting started with?
> Thanks, Stephen

More information about the ESS-help mailing list