Re: [R] 404 HTTP not found

2006-09-18 Thread Prof Brian Ripley
See ?try ?tryCatch On Mon, 18 Sep 2006, Stefan Th. Gries wrote: Hi I wrote a script which retrieves links from websites and loads them with scan: ... website-tolower(scan(current.pages[i], what=character, sep=\n, quiet=TRUE)) ... However occasionally, the script finds broken links,

[R] 404 HTTP not found

2006-09-17 Thread Stefan Th. Gries
Hi I wrote a script which retrieves links from websites and loads them with scan: ... website-tolower(scan(current.pages[i], what=character, sep=\n, quiet=TRUE)) ... However occasionally, the script finds broken links, such as http://www.google.com/test. when the script tries to access such

Re: [R] 404 HTTP not found

2006-09-17 Thread Gabor Grothendieck
See ?try as in this example: current.pages - c(http://www.google.com;, http://www.google.com/test;, http://www.yahoo.com;) for(i in seq(along = current.pages)) { website - try(tolower(scan(current.pages[i], what=character, sep=\n, quiet=TRUE))) if