[R] Start and Restart R over SSH

Douglas Bates bates at stat.wisc.edu
Mon Feb 19 15:40:07 CET 2007


On 2/19/07, Nils Höller <mail at nhoeller.de> wrote:
> Hi,
>
> I have some big calculations in R to be done.
> Since I can use R on a server with ssh, i was wondering if I can reopen
> a R Shell after exiting ssh.
>
> I don't want to use the batch mode and nohup doesn't work.
>
> I want to use something like
> ssh user at server
> R
> ---do something in R and start calculation ---
> close ssh but let R remain on the server, doing the calculation
>
> ssh user at server
> open the existing R Shell / Process
>
> Has anyone done something similiar?
> Can you help me or suggest an other solution ?

I don't think it is possible to reattach to a process started in one
ssh session from another ssh session.  However, you can put a session
into the background with the -f flag to ssh.  You haven't told us what
operating system you are starting the ssh connection on and what
system will run the R process.  If I had an X server running on the
local system and the remote system provided X clients like xterm I
would do this by

ssh -X -f user at server xterm

This should spring up an autonomous xterm window on the local machine
after which you can run R in it.

I hope this helps.



More information about the R-help mailing list