title: Generate Random number in for loop R
body: <p>I want to run a for loop 1000 times generating a new set of new numbers which then run through my function cdfx. However, when I run my code I get: <strong>Error: object 'rdm' not found.</strong></p>
  
  <pre><code> for (i in 1:1000) {
    rdm[i] &lt;- runif(12, 17, 22)
    cdfxr &lt;- cdfx(rdm[i])
    cdfxr[i] &lt;- cdfxr 
  }
  </code></pre>
  
  <p>Can anybody please tell me what I am doing wrong?</p>