title: Adding vector from simulations in R
body: <p>i am trying to simulate data using R.When i run the code below it creates an array with all the 10000 iterations from rexp. How can I have another vector within x to store the values from rpois(1,1,2) in code below. </p>
  
  <pre><code>set.seed(0) 
  system.time( x &lt;- replicate(10000 ,rexp(rpois(1,1.2), rate=0.1)) )
  </code></pre>
  
  <p>Currently the first few output values from the code are.</p>
  
  <pre><code>   [[1]]
     [1] 2.669865 0 0 4.150295
  
     [[2]]
     [1] 0 4.150295 
  
     [[3]]
     [1]2.669865 14.759684  4.150295  4.635850 11.200548
  </code></pre>
  
  <p>so in the revised code I would like to include count values from rpois(1,1.2)so the above output will be</p>
  
  <pre><code>   [[1]]
     [1] 4 2.669865 0 0 4.150295
  
     [[2]]
     [1] 2 0 4.150295 
  
     [[3]]
     [1] 5 2.669865 14.759684  4.150295  4.635850 11.200548
  </code></pre>