How can i use the try/try catch function in R to proceed to next loop and do sys.sleep for 60 seconds if the trycatch/try function returns an error. ANy help would be appreciated, thanks.
try this :
for (x in list(1,2,"a",4,5)){ print(x) y <- try( x+1) # maybe you want try(x+1,silent=TRUE) if(inherits(y, "try-error")) Sys.sleep(5) }
2.1m questions
2.1m answers
60 comments
57.0k users