search for: theurlerror

Displaying 1 result from an estimated 1 matches for "theurlerror".

2007 Feb 12
2
help with tryCatch
...e and surround by try and catch to be safe # get.hist.quote() is in library(tseries), but the question does not depend on it, I could be sourcing local files instead ans=null;error=null; for ( sym in sym.vec){ try(ans=cbind(ans,get.hist.quote(sym,start=start))) #accumulate in a zoo matrix catch(theurlerror){error=c(error,sym)} #accumulate failed symbols } I know the code above does not work, but it conveys the idea. tryCatch help page says it is similar to Java try-catch, but I know how to do a try-catch in Java and still can't do it in R. Thank you very much. stephen