[R] Working comfortably with (X)Emacs + Sweave

Tamas Papp tpapp at axelero.hu
Wed Apr 30 19:11:01 CEST 2003


Dear List,

I am trying to become more familiar with Sweave at the moment, beacuse
I am convinced that it will eventually make my life easier. However,
I have not found anything relevant in the mail archives about the
following problem.

Both the article in R-News and the Sweave FAQ suggest that Emacs would
be a great development environment for working with Sweave. So far, it
doesn't seem to fit that description... Maybe I'm doing something
wrong. I am going to describe the way I do things, and hope that
people on this list can suggest something more comfortable.

I edit the file in one buffer and keep one open for the R prompt.
Every time I need to recompile the whole document (Sweave to, say,
DVI) I go through the following:

1. call sweave manually via the R prompt
2. open the resulting LaTeX file (I have not found a way to refresh
this, maybe there's some magical XEmacs keystroke that rereads the
file from the disk?, so I keep opening/closing it)
3. compile the LaTeX file

This is a bit tedious as I like to compile often, because I like to
see the way my document looks (I know that TeX is WYSIWYM, but I
prefer to check my formulas instantly).

I would appreciate if people told me how they solve these problems or
have found any other way to make Xemacs more comfortable. A
"call sweave and then latex on this file in one go" and "show the DVI
that was produced from this Rnw file" command would be very
useful. Emacs init.el files and similar would help a lot, too.

Or maybe I am just trying to use things the wrong way, if so, please
enlighten me ;-) If this is not how people use Sweave+Emacs, then tell
me how I should do it.

Thanks in advance,

Tamas Papp

-- 
Tamás K. Papp
E-mail: tpapp at axelero.hu (preferred, especially for large messages)
        tpapp at westel900.net
Please try to send only (latin-2) plain text, not HTML or other garbage.



More information about the R-help mailing list