I have a loop over readLines(URL[i]) which works fine until it hits a bad URL (e.g., a URL that returns a 404 Error). How can I handle this with a test for this error condition. I read the tryCatch( … ) description but can't figure out how to apply it here. Perhaps there is something else that would work better.