title: How to test for the EOF flag in R?
body: <p>How can I test for the <code>EOF</code> flag in R? </p>
  
  <p>For example:</p>
  
  <pre><code>f &lt;- file(fname, "rb")
  while (???) {
      a &lt;- readBin(f, "int", n=1)
  }
  </code></pre>