Hi all,
If I use a function in R which takes some parameters as an input, how can I
stop this function in the while loop and try another parameter in case the
function takes long time or could not converge.
Actually, I'm using "penalized" function in a loop for some fixed lambdas
(pre-calculated), for some of them the function converged, but for some not.
Now I decide to proceed in this way that if it takes longer than 3 mins, stop
the "penalized" function and try the other lambdas.
I need to do it in the loop since the loop is in the big program and I can't
manually stop and begin again.
Looking forward to your reply.
NO
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.