search for: fittingfunction

Displaying 1 result from an estimated 1 matches for "fittingfunction".

2012 Mar 15
2
Timer on a function
Hello, I have a program 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...