title: building an R loop for random sampling
body: <p>I am sampling from a file containing a list of many values eg:</p>
  
  <pre><code>312313.34
  243444
  12334.92
  321312
  353532
  </code></pre>
  
  <p>and using R to randomly sample from this list:</p>
  
  <pre><code>list = read.table("data")
  out &lt;-sample(list,50,replace=TRUE)
  out.mean&lt;-mean(out)
  out.mean
  </code></pre>
  
  <p>Could somebody please show me how to put this into a loop, so that I can perform this procedure 1000 times and take the mean of the 1000 means that this will generate?</p>
  
  <p>Thank you very much in advance!</p>
  
  <p>Rubal</p>