2017-08-14 26 views

回答

3

使用Sys.sleep()

i = 1 
while(TRUE){ 
    if (i %% 11 == 0){ 
     break   #A condition to break out of the loop 

     #write.table() #But maybe you would want to write results 
         #to a table after certain number of iteration 
    } 

    print(i)   #Run your code 

    Sys.sleep(time = 1) #Time in seconds 

    i = i + 1 
} 
相关问题