How to automatically stop a function(defined by R itself) if it lasts too long?

Hello everybody,

I was wondering if there is any way to automatically stop a function(defined by R itself) if
it lasts too long? I am studying the time effect of different combinations of parameters on a function for particular models. However, I want first to discard some possibilities which take too much time.

All the classical time tools in R don’t work… I didn’t find any of them which can kill a function if it takes too much time…

Thanks in advance

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.