Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set a delay between two instructions in R [duplicate]

Tags:

r

How to Set a delay time between two instructions in R ,

For (i in 1:N){
instruction 1
- delay time -
instruction 2
}
like image 209
SalimK Avatar asked Jan 18 '16 16:01

SalimK


1 Answers

It sounds like you are looking for Sys.sleep.

You would do:

for (i in 1:N){
  instruction 1
  Sys.sleep(time_in_seconds)
  instruction 2
}
like image 84
A5C1D2H2I1M1N2O1R2T1 Avatar answered Nov 16 '22 11:11

A5C1D2H2I1M1N2O1R2T1