[Rd] No exit codes from RTerm (Windows) (PR#9296)

russell-lenth at uiowa.edu russell-lenth at uiowa.edu
Fri Oct 13 23:29:18 CEST 2006


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.




More information about the R-devel mailing list