I have an XP batch file that runs sweave and figures out whether to proceed
by comparing the file dates on the .Rnw and .tex files (and also on the
.tex and .pdf files).   It will be included in the next version of the
batchfiles project:
    http://cran.r-project.org/contrib/extra/batchfiles/
hopefully to be released this weekend or shortly.  I will contact you
offline if in case you would like to test it.


On 10/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Full_Name: Russell V. Lenth
> Version: 2.3.1
> OS: Windows XP Pro
> Submission from: (NULL) (128.255.132.188)
>
>
> I wrote a simple .BAT file to run the Sweave function on a file (via RTerm),
> then run pdflatex on the result (after RTerm exits).  The issue is that if an
> error condition occurs in RTerm, it is prudent to not do the pdflatex 
> processing
> afterward.
>
> Here are the relevant statements in the BAT script:
>
>    echo Sweave("%1",style=F,eps=F) | Rterm --no-save --no-restore
>    if not errorlevel == 0 goto end
>
> The problem is that the errorlevel seems to always be 0, even if an error
> occurs.  I have a similar shell script for our linux system, and it works
> correctly.  Are there no provisions for RTerm to return an exit code in 
> Windows?
>  It would be very useful to me if it would return a nonzero exit code when 
> there
> is an error.
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to