[R] Run Sweave and LaTeX directly from command line

Gabor Grothendieck ggrothendieck at myway.com
Wed Feb 23 06:16:28 CET 2005



This does not really answer your question and frankly
I have not really spent the time to figure out what your
script does but assuming ...\R\rw????\bin is in your PATH
then the following one line batch file will run Sweave
from the command line in the Windows console (assuming
its placed in a batch file called Sweave.bat):

rem Usage: Sweave filename
echo Sweave("%1") | R --no-save --no-restore

After running this the user would run 
texi2dvi --pdf myfile.tex


Date:   Tue, 22 Feb 2005 20:46:01 +0100 
From:   Gorjanc Gregor <Gregor.Gorjanc at bfro.uni-lj.si>
To:   <ggrothendieck at myway.com>, <r-help at stat.math.ethz.ch>, <Friedrich.Leisch at ci.tuwien.ac.at> 
Subject:   RE: [R] Run Sweave and LaTeX directly from command line 
 
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.

--
Lep pozdrav / With regards,
Gregor GORJANC




More information about the R-help mailing list