Re: [R] remotely saving an R session

2006-09-21 Thread Barry Rowlingson
Jeffrey Horner wrote:

> $ 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.

  Remember? With a computer, you never need to remember!

  $ ls -l /proc/$pid/cwd

  is a symlink to the current working directory. Even if you change it 
with setwd() in R, it is still correct.

Barry

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] remotely saving an R session

2006-09-21 Thread Prof Brian Ripley
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,  [EMAIL PROTECTED]
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, UKFax:  +44 1865 272595

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] remotely saving an R session

2006-09-20 Thread Jeffrey Horner
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.

Good luck!

Jeff
-- 
http://biostat.mc.vanderbilt.edu/JeffreyHorner

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] remotely saving an R session

2006-09-20 Thread Simon Blomberg
Does save.image do what you want?

Gamal Azim wrote:
> Forgot to indicate that the remote system is Linux,
> accessed remotely by ssh. 
>
> --- Gamal Azim <[EMAIL PROTECTED]> 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.
>>
>> Thanks
>>
>> __
>> R-help@stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained,
>> reproducible code.
>>
>> 
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>   


-- 
Simon Blomberg, B.Sc.(Hons.), Ph.D, M.App.Stat. 
Centre for Resource and Environmental Studies
The Australian National University  
Canberra ACT 0200   
Australia   
T: +61 2 6125 7800 email: Simon.Blomberg_at_anu.edu.au
F: +61 2 6125 0757
CRICOS Provider # 00120C

The combination of some data and an aching desire for 
an answer does not ensure that a reasonable answer 
can be extracted from a given body of data.
- John Tukey.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] remotely saving an R session

2006-09-20 Thread Gamal Azim
Forgot to indicate that the remote system is Linux,
accessed remotely by ssh. 

--- Gamal Azim <[EMAIL PROTECTED]> 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.
> 
> Thanks
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained,
> reproducible code.
>

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.