From russell-lenth at uiowa.edu  Fri Oct 13 23:29:18 2006
From: russell-lenth at uiowa.edu (russell-lenth at uiowa.edu)
Date: Fri, 13 Oct 2006 23:29:18 +0200 (CEST)
Subject: [Rd] No exit codes from RTerm (Windows) (PR#9296)
Message-ID: <20061013212918.267F54C916@slim.kubism.ku.dk>

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.




[Rd] No exit codes from RTerm (Windows) (PR#9296)
russell-lenth at uiowa.edu