[R] R CMD BATCH: & and nohup

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Aug 1 13:39:08 CEST 2001


On Wed, 1 Aug 2001, Agustin Lobo wrote:

> I 've observed that, at least in my system, a non-interactive
> R session requires &, i.e.:
>
> R CMD BATCH commandfile.in logfile.out &

Only if you want to run it in the background, which you might well not.
So this is intentional (and intentionally different from S-PLUS).

One common use of R CMD BATCH is to run a series of jobs in succession,
and that is harder to do with the S-PLUS form (you have to play with
wait).

> Is nohup also required to avoid that the R session be  halted
> after logging out? i.e.
>
> nohup R CMD BATCH commandfile.in logfile.out &

Depends on your unnamed system!  You are asking how your OS and shell
work, which is impossible for us to guess.  For example, csh has a builtin
command nohup, and on BSD and SVR4 systems nohup does different things.

In my experience the answer is probably no if you are using a windowing
system, probably yes if you are running R in the login shell directly.

[Since you have asked several questions with insufficient information, do
please think about supplying the basic details each time.]

-- 
Brian D. Ripley,                  ripley at 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

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list