title: R - plotting points on the same plot in for loop
body: <pre><code>lambda &lt;- runif(10,min=0,max=3)
  mean(lambda)
  for (i in 1:10){
     N &lt;- rpois(i,mean(lambda))
     mean(N)
     plot(i,mean(N))
  }
  </code></pre>
  
  <p>Hi all, this is a really simple R code block I have here. I am basically trying to create a plot where I can see how the mean of the poisson distribution is changing as I increase its iteration using the rpois function. I would like to post these values (mean(N)) all on the same graph so I can see the change but I am not quite sure how to do that.</p>
  
  <p>I have been googling a lot and I came across qqplot or so but I just started using R few days ago and I have having a lot of trouble.</p>
  
  <p>Any insights would be helpful</p>