title: Generate a list of primes up to a certain number
body: <p>I'm trying to generate a list of primes below 1 billion.  I'm trying this, but this kind of structure is pretty shitty.  Any suggestions?</p>
  
  <pre><code>a &lt;- 1:1000000000
  d &lt;- 0
  b &lt;- for (i in a) {for (j in 1:i) {if (i %% j !=0) {d &lt;- c(d,i)}}}
  </code></pre>