From ligges at statistik.uni-dortmund.de  Sun Jan 16 15:26:38 2005
From: ligges at statistik.uni-dortmund.de (Uwe Ligges)
Date: Sun Jan 16 15:25:52 2005
Subject: [Rd] running Sweave from Windows XP Explorer
In-Reply-To: <4717.220.236.48.36.1105851224.squirrel@220.236.48.36>
References: <4717.220.236.48.36.1105851224.squirrel@220.236.48.36>
Message-ID: <41EA799E.6080501@statistik.uni-dortmund.de>

Gordon K Smyth wrote:
> I'd like to create a suitable batch file or shortcut so that I can run Sweave on a .Rnw or .Rtex
> file simply by clicking on the file from Windows Explorer in Windows XP (as I do with latex,
> bibtex etc).  This looks tantalisingly possible using R CMD BATCH or Rterm possibly in combination
> with a .bat file.  Has anyone succeeded is setting it up and would give me a pointer?
> 
> Thanks
> Gordon
> 
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel


As a very simple starting *idea*, a batch file could look like, e.g.,

   R CMD BATCH --no-save c:/myscripts/MakeSweave.R
   texi2dvi --pdf %1.tex
   gsview32 %1.pdf


with MakeSweave.R:

   library(tools)
   for(i in list.files(pattern = "\\.Rnw$")) Sweave(i)


[Rd] running Sweave from Windows XP Explorer
Uwe Ligges