[R] How to execute multiple R scripts sequentially in unix background

Detlef Steuer detlef.steuer at hsu-hamburg.de
Fri May 21 10:26:14 CEST 2010


On Fri, 21 May 2010 03:29:49 -0400
Yong Wang <wangyong1 at gmail.com> wrote:

> Dear list
> 
> I need to 1) run several R scripts sequentially due to results waiting
> and 2) run them in unix background since my ssh frequently timeout for
> some reason.

If this is the main obstacle you should learn about screen!

http://www.gnu.org/software/screen/


> if paste following codes to unix
> 
> R --vanilla script1 &
> R --vanilla script2 &
> R --vanilla script3 &
> 
> will result in simultaneous instead of sequential execution of the
> three scripts.
> 
> source() might be an alternative, however, I am not clear how to run
> it in the background.

May be a script containing 
source("script1")
source("script2")
source("script3")
does the trick for you?

Have a nice weekend.

detlef


> 
> Thanks
> 
> yong
> 
> ______________________________________________
> R-help at r-project.org 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.



More information about the R-help mailing list