Displaying 1 result from an estimated 1 matches for "stopifundertim".
Did you mean:
stopifundertime
2012 Mar 15
2
Timer on a function
...m that consists of a loop fitting a function over many models. Sometimes the fitting on a particular model takes minutes to converge. Is there a way that I can limit the amount of time that R spends on a given model:
say if my line is:
fittingFunction( func, model.1)
can I have some function:
stopIfUnderTime( fittingFunction( func, model.1) , 5 )
where stopIfUnderTime will return the result if it finishes under 5 seconds, or NA otherwise.
Is there anything like this? (just looked through the web but did not find anything)
Thanks,
Ramiro
[[alternative HTML version deleted]]