[R] remotely saving an R session

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Sep 21 10:24:30 CEST 2006


On Wed, 20 Sep 2006, Jeffrey Horner wrote:

> Gamal Azim wrote:
>> Is it possible to remotely save an R session then
>> terminate R? Of course the destructive task after
>> 'then' is rather straightforward by itself.
>
> Yes. Sending the process a SIGUSR1 signal:
>
> $ kill -USR1 pid
>
> will save the global environment in the file .RData, but you'll need to
> remember the current working directory of the process to find it.

That is indeed what this is documented to do (and I mentioned in an 
R-devel posting yesterday).  Unfortunately it currently does not always 
work: try it on a session running

try(repeat{1})

to see the problem.

-- 
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list