title: struggling with integers (maximum integer size)
body: <p>I was using a function that requires input as integers.</p>
  
  <p>So I have been trying to <a href="http://www.r-tutor.com/r-introduction/basic-data-types/integer">read up on making things integers</a>:</p>
  
  <pre><code>y &lt;- 3.14
  as.integer(y)
  [1] 3              # all cool
  </code></pre>
  
  <p>All good, but if I have</p>
  
  <pre><code> x &lt;- 1639195531833
   as.integer(x)
   [1] NA
   Warning message:
   NAs introduced by coercion 
  </code></pre>
  
  <p>I had <code>options(digits = 15)</code> on and it confused my why it wasn't working but in a clean session it must be to do with the scientific notation.</p>
  
  <p>I also tried to trick R but it was not happy:</p>
  
  <pre><code>  as.integer(as.character(x))
  [1] 2147483647
  Warning message:
  inaccurate integer conversion in coercion 
  </code></pre>
  
  <p>How do I defeat scientific notation and get my integers?</p>