[R] Stop a loop if it takes long time

Christofer Bogaso bog@@o@chri@tofer @ending from gm@il@com
Tue Jul 24 12:17:41 CEST 2018


Let say I am implementing a loop using for() / apply()-family etc.

Now, the calculation-time within a particular loop is not fixed, means,
some loop takes a long time to finish calculation, and next loop perhaps
very quick to finish.

I am exploring if there is any way, to check if the calculation within a
particular loop takes longer time than a pre-fixed threshold and if it does
then kill that loop and proceed to the next.

Is it possible to implement such without adding much overhead with existing

Thanks for your feedback

	[[alternative HTML version deleted]]

More information about the R-help mailing list