s-news
[Top] [All Lists]

Re: Aliasing Splus and using BATCH or SBATCH

To: andreas.krause@novartis.com
Subject: Re: Aliasing Splus and using BATCH or SBATCH
From: Martin Maechler <maechler@stat.math.ethz.ch>
Date: Wed, 31 Aug 2005 11:51:53 +0200
Cc: Prof Brian Ripley <ripley@stats.ox.ac.uk>, s-news@lists.biostat.wustl.edu
In-reply-to: <OF9AD1B820.A89E412B-ONC125706E.0032137C-C125706E.00337878@EU.novartis.net>
References: <OF9AD1B820.A89E412B-ONC125706E.0032137C-C125706E.00337878@EU.novartis.net>
Reply-to: Martin Maechler <maechler@stat.math.ethz.ch>
>>>>> "andreas" == andreas krause <andreas.krause@novartis.com>
>>>>>     on Wed, 31 Aug 2005 11:22:11 +0200 writes:

    andreas> Thank you, this sheds more light on what's going on.
    andreas> Not being a real unix/bash guru the way I understand this is that 
cled 
    andreas> (command line editor?), called from the script Splus, exits 
silently if 
    andreas> called with BATCH in out.
    andreas> Makes me wonder if that could and should not be filtered out by 
the Splus 
    andreas> script.
    andreas> Actually I wonder why anyone would not want the command retrieval 
    andreas> functionality for the command line and why one needs the "-e" 
option.

One reason:
Many pros use Emacs and ESS (http://ESS.r-project.org/), 
and you don't want the "command line interface" interfering with ESS.

But one could imagine that the defaults were different, as they
are in R:  It uses "readline" and that's *on* by default, and
can be turned off. 
And it is turned off explicitly automatically within startup of ESS 
(by effectively calling  "R --no-readline ...").

With regards from Zurich to Basel:
Martin Maechler 






    andreas> Prof Brian Ripley <ripley@stats.ox.ac.uk>
    andreas> 08/30/2005 07:09 PM

 
    andreas> To:     Andreas Krause/PH/Novartis@PH
    andreas> cc:     s-news@lists.biostat.wustl.edu
    andreas> Subject:        Re: [S] Aliasing Splus and using BATCH or SBATCH
    andreas> Category: 



    andreas> I cannot run Splus -e for 6.2 any more (it does not work with a 
2.6.x 
    andreas> kernel).  With 7.0 I get an empty test.log.  This is not 
surprising as if 
    andreas> you run

    andreas> Splus -e BATCH test.ssc test.log

    andreas> you get the same.  If you read the script file you will see if it 
    andreas> encounters -e it uses
    andreas> S_FRONT_END="$CLED $CLEDJCTL --"
    andreas> in

    andreas> exec $S_FRONT_END "$c" ${1+"$@"}

    andreas> do it runs cled and not the batch script.

    andreas> On Tue, 30 Aug 2005 andreas.krause@novartis.com wrote:

    >> S-Plus 6.2.1 for Linux using Red Hat and bash.
    >> 
    >> I have aliased Splus to Splus -e and want to run Splus in batch mode.
    >> This seems to prevent Splus from running BATCH properly.
    >> Details:
    >> 
    >>> From the Unix (bash) command line, enter
    >> 
    >> # set the alias
    >> alias Splus="Splus -e"
    >> 
    >> # generate a command file
    >> cat > test.ssc
    >> print(1:11)
    >> <Ctrl-D>
    >> 
    >> # run it
    >> Splus BATCH test.ssc test.log
    >> 
    >> No visible effect of anything being done, no file test.log created.
    >> However,
    >> 
    >> Splus SBATCH -input test.ssc
    >> 
    >> works as I expect it, creating files test.slg and test.txt.
    >> 
    >> It seems that the problem is in the script execution, <Splus
    directory> /cmd/BATCH but if I add a line
    >> echo $1 in the beginning, I get the name of the script file (so things
    >> seem to be fine).
    >> Any idea what's going on and how I can still alias Splus as above?
    >> Btw, without the alias set all works fine.
    >> 
    >> Thanks in advance!
    >> 
    >> Andreas
    >> 
    >> --------------------------------------------------------------------
    >> This message was distributed by s-news@lists.biostat.wustl.edu.  To
    >> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
    >> the BODY of the message:  unsubscribe s-news
    >> 

    andreas> -- 
    andreas> Brian D. Ripley,                  ripley@stats.ox.ac.uk
    andreas> Professor of Applied Statistics,  
http://www.stats.ox.ac.uk/~ripley/
    andreas> University of Oxford,             Tel:  +44 1865 272861 (self)
    andreas> 1 South Parks Road,                     +44 1865 272866 (PA)
    andreas> Oxford OX1 3TG, UK                Fax:  +44 1865 272595



    andreas> 
--------------------------------------------------------------------
    andreas> This message was distributed by s-news@lists.biostat.wustl.edu.  To
    andreas> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu 
with
    andreas> the BODY of the message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>