Hi, I am running an R calculation on a Linux machine remotely. The calculations take about 5 hours to complete, and inevitably my connection gets reset before I finish my calculations. Someone told me that there is a way to invoke R in the background, but I have not been able to find out how. Is this possible, and if so how? Thanks for your help, Jennifer Hespen -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Monday 23 September 2002 15:54, Jennifer Hespen wrote:> Hi, > > I am running an R calculation on a Linux machine remotely. The calculations > take about 5 hours to complete, and inevitably my connection gets reset > before I finish my calculations. Someone told me that there is a way to > invoke R in the background, but I have not been able to find out how. Is > this possible, and if so how?You can do something like: $> nohup /usr/bin/R --vanilla < myCode.R & This will create a file "nohup.out" with the output of your program. After running the above command you may logout your connection. -- Luis Torgo FEP/LIACC, University of Porto Phone : (+351) 22 607 88 30 Machine Learning Group Fax : (+351) 22 600 36 54 R. Campo Alegre, 823 email : ltorgo at liacc.up.pt 4150 PORTO - PORTUGAL WWW : http://www.liacc.up.pt/~ltorgo -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Jennifer Hespen wrote:> > Hi, > > I am running an R calculation on a Linux machine remotely. The calculations > take about 5 hours to complete, and inevitably my connection gets reset before > I finish my calculations. Someone told me that there is a way to invoke R in > the background, but I have not been able to find out how. Is this possible, > and if so how?You can write your code into a file, say myfile.R . Then just start R in its BATCH mode, an tell the process not to hang up if you are logged off: nohup R BATCH myfile.R & Uwe Ligges -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
You can have R (or other processes) run in the background through nohup. At the shell prompt, do nohup R BATCH --vanilla infile outfile & You may logout and check your the output file after it finishes. Jun On Mon, 23 Sep 2002, Jennifer Hespen wrote:> Hi, > > I am running an R calculation on a Linux machine remotely. The calculations > take about 5 hours to complete, and inevitably my connection gets reset before > I finish my calculations. Someone told me that there is a way to invoke R in > the background, but I have not been able to find out how. Is this possible, > and if so how? > > Thanks for your help, > > Jennifer Hespen-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._