s-news
[Top] [All Lists]

Re: [S] Scripts output!

To: Gérald Jean <Gerald.Jean@spgdag.ca>
Subject: Re: [S] Scripts output!
From: Prof Brian D Ripley <ripley@stats.ox.ac.uk>
Date: Wed, 22 Sep 1999 15:00:21 +0100 (BST)
Cc: s-news@wubios.wustl.edu
In-reply-to: <852567F4.0048BA65.00@mail.spgdag.com>
Sender: owner-s-news@wubios.wustl.edu
On Wed, 22 Sep 1999, [iso-8859-1] Gérald Jean wrote:

> yesterday afternoon before leaving for the day I started a scipt which ran
> several functions, each one taking roughly an hour to run, the first four
> ran successfully, a lot of output to the screen testify that, the last one
> bombed.  All the functions were assigning their results to a different
> object.  None of those objects exist this morning.  Must I understand that
> those objects would be committed only when the whole script runs
> successfully?  If so it's a serious flaw, in my opinion anyway.  In my view
> scripts are not functions, they are just a convenience to run several
> functions, or maybe the same function with different inputs, at times when
> the machine is not busy doing something else.  I don't see the point if
> results are not committed until the script completes successfully???

By a script, do you mean a .ssc file in S-PLUS 4.x? Or what?  Things which
are run from source() are not committed until the whole input successfully
completes.  Submitting from .ssc files appears to work that way (although I
have never seen that written down). On the other hand, running scripts on
Unix by indirection (Splus < infile > outfile) or by Splus BATCH or on
Windows by indirection (Sqpe.exe < infile > outfile) and as far as I know
SPLUS.exe /BATCH all do commit immediately a top-level expression is
finished.  They all use much less memory, too.

If none of those appeals, do ensure that the objects you want to save are
assigned, by assign(name, value, w=1, immediate=T) or (whisper it) use <<-.

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

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

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