[ESS] Is ess supposed to help with Sweave documents?

Paul Johnson pauljohn at ku.edu
Wed Oct 27 19:22:44 CEST 2004


I was just learning how to do Sweave documents with Emacs & R.  I did 
not find a simple 1-2-3 explanation of how this is supposed to go.

It seems downright awkward. Am I doing this right?

Open doc.Snw in emacs, fiddle that and save it, then do

M-x R

to start R,  then in the R session

 > Sweave("doc.Snw")

it says the tex file is ready for latex, so in emacs I  open "doc.tex" 
and run latex on that. If "doc.tex" is already open, I have to revert 
buffer, then run latex on that.  Several times I accidentally edited the 
tex file, when I should have been editing the Snw file.

I'm having trouble believing that other people (particularly, the 
proponents of Sweave) are going through this tedious process.  It is 
such a convoluted process, I could never explain it to a graduate student.

If, in ESS, I could us a menu to say "filter document through R, run 
latex on the result, and view the PDF document", it would be massively 
more useful!!  Do you have such a thing?

Sometimes the ESS functions for R are accessible inside the R code 
chunks of the Sweave document, and I can send stuff to R to see what it 
does. Sometimes the ESS functions disappear from Emacs, and I can't send 
commands over.

-- 
Paul E. Johnson                       email: pauljohn at ku.edu
Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66044-3177           FAX: (785) 864-5700




More information about the ESS-help mailing list