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) }
1.4m articles
1.4m replys
5 comments
57.0k users