[R] Run Sweave and LaTeX directly from command line

Friedrich.Leisch@tuwien.ac.at Friedrich.Leisch at tuwien.ac.at
Wed Feb 23 09:20:51 CET 2005


>>>>> On Tue, 22 Feb 2005 20:46:01 +0100,
>>>>> Gorjanc Gregor (GG) wrote:

  > Gabor,
  > I definitely agree about use of R, however I am not so "much in" R 
  > as I am in Bash. It took me less than two hours to write this script.

  > At home I use R under windows and I solve problem of portability 
  > with Cygwin. I know that this is not optimal solution for everyone 
  > but ...

  > Can you provide me some insights/thoughts how this script might be 
  > written in R? I am open for discussion and cooperation on this script.



  > What do you think Friedrich? I must look at this texi2dvi. I didn't 
  > hav any experience with it jet. I will look at it.

Well, I didn't know about rubber before I read your script ... seems
like the 2 do the same job. Some windows installations have a tool
called "texify" which again does the same: run latex, bibtex, etc. as
many times as needed.

Ad shell vs. R: In R we already have almost all that is needed:

example(Sweave)
library(tools)
texi2dvi("Sweave-test-1.tex")

should do what you want ... and a Snw2dvi function is the
corresponding 2-liner. If there is need for it I'm happy to include it
in package utils.

HTH,
Fritz




More information about the R-help mailing list