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

2010-05-21 Thread Uwe Ligges



On 21.05.2010 09:29, Yong Wang 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 paste following codes to unix

R --vanilla script1
R --vanilla script2
R --vanilla script3



1. Write a shell script that does the above, or

2. Write an R script that contains the lines:

source(script1)
source(script2)
source(script3)

and call it via

R --vanilla script


or or or.

Uwe Ligges




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.

Thanks

yong

__
R-help@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.


__
R-help@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.


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

2010-05-21 Thread Detlef Steuer
On Fri, 21 May 2010 03:29:49 -0400
Yong Wang wangyo...@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@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.

__
R-help@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.