I am testing my code using multiple methods.
If a certain method/function, say glm()
takes more than 30 minutes, I want to kill that function and proceed onto the next one, without terminating my R session.
In other words, is there a way to set a time limit on an R function and move on to the next step?