Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>To follow up on my comments - here's a basic concept to put in a Sys.sleep half way through your loop.</p> <pre><code>for (i in 1:10) { if(i == 5) { print("halfwayhome") Sys.sleep(5) print(i) } else { print(i) } } </code></pre> <p>Results in:</p> <pre><code>[1] 1 [1] 2 [1] 3 [1] 4 [1] "halfwayhome" [1] 5 [1] 6 [1] 7 [1] 8 [1] 9 [1] 10 </code></pre> <p>So I don't have any experience with RCurl or parsing HTML pages, so I conveniently avoided that part of your task. However, I was able to successfully generate a list of addresses, download them with <code>readLines()</code> and then write them back out. I put a <code>Sys.sleep()</code> call after each one, and things seem to work peachy.</p> <pre><code>links &lt;- c("http://news.lugnet.com/dear-lego/?n=1", "http://news.lugnet.com/dear-lego/?n=2", "http://news.lugnet.com/dear-lego/?n=3", "http://news.lugnet.com/dear-lego/?n=4", "http://news.lugnet.com/dear-lego/?n=5", "http://news.lugnet.com/dear-lego/?n=6", "http://news.lugnet.com/dear-lego/?n=7", "http://news.lugnet.com/dear-lego/?n=8", "http://news.lugnet.com/dear-lego/?n=9", "http://news.lugnet.com/dear-lego/?n=10" ) for (j in 1:length(links)){ dat &lt;- readLines(links[j]) write.table(dat, paste0("outfile",j,"txt")) Sys.sleep(5) cat("Finished file", j) } </code></pre> <p>I'd ask a new/different question if you need to parse those HTML pages or get something more useful out of them, I probably won't be of much assistance on that front.</p> <p>Hope this helps, -Chase</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload