text: user4888: I'm trying to use rentrez package to retrieve NIH files, and ran the following code (I followed what was on the rentrez tutorial):
  pubmed_search <- entrez_search(db = "pubmed", 
                      term = "Case Reports[Filter] AND cardiovascular disease AND English[lang] AND 2009:2019[PDat])", 
                      retmax = 792711, 
                      use_history = TRUE)
  
  for(i in seq(1,10000,100)){   
      recs <- entrez_summary(db="pubmed", 
                             web_history=pubmed_search$web_history,
                             retmax=100, 
                             retstart=i)   cat(    
  seq_start+99, "sequences downloaded\r") }
  
  However, instead of the 10,000 texts I expected, I only downloaded 100 files. Could so
  
  user3848: I don't program in R, but replace the last line of you code with the following and I suspect you will find it works,
  for(i in seq(1,10000,1)){ recs <- entrez_summary(db="pubmed", web_history=pubmed_search$web_history, retmax=100, retstart=i) cat(seq_start+99, "sequences downloaded\r") }
  
  Rationale I would guess seq is similar to the linspace function in Python, and put simply 10000 (total sample size) / 100 (the step size) = 100, 100 being the number of downloads you observed. In the code above its 10000/1. I would also suspect "step size = 1" is default, if this was correct then seq(1,10000) would give you your required output.
  As a random aside I do like the presence of curly brackets defining the loop, it reminds me of Perl.
  
original_text: 4888: <p>I'm trying to use rentrez package to retrieve NIH files, and ran the following code (I followed what was on the rentrez tutorial):</p>
  
  <pre><code>pubmed_search &lt;- entrez_search(db = "pubmed", 
                      term = "Case Reports[Filter] AND cardiovascular disease AND English[lang] AND 2009:2019[PDat])", 
                      retmax = 792711, 
                      use_history = TRUE)
  
  for(i in seq(1,10000,100)){   
      recs &lt;- entrez_summary(db="pubmed", 
                             web_history=pubmed_search$web_history,
                             retmax=100, 
                             retstart=i)   cat(    
  seq_start+99, "sequences downloaded\r") }
  </code></pre>
  
  <p>However, instead of the 10,000 texts I expected, I only downloaded 100 files. Could so</p>
   3848: <p>I don't program in R, but replace the last line of you code with the following and I suspect you will find it works,</p>
  
  <pre><code>for(i in seq(1,10000,1)){ recs &lt;- entrez_summary(db="pubmed", web_history=pubmed_search$web_history, retmax=100, retstart=i) cat(seq_start+99, "sequences downloaded\r") }
  </code></pre>
  
  <p><strong>Rationale</strong> I would guess <code>seq</code> is similar to the <code>linspace</code> function in Python, and put simply <code>10000 (total sample size) / 100 (the step size) = 100</code>, 100 being the number of downloads you observed. In the code above its <code>10000/1</code>. I would also suspect "step size = 1" is default, if this was correct then <code>seq(1,10000)</code> would give you your required output.</p>
  
  <p>As a random aside I do like the presence of curly brackets defining the loop, it reminds me of Perl.</p>
  