title: What does specifying a vector of means/standard deviations for rnorm do?
body: <p>The following line produces 1000 random draws from the normal distribution with mean 0 and sd 1.</p>
  
  <pre><code>rnorm(1000,0,1)
  ## [1] -0.3314116  2.3704895 -0.8110266  1.0777301 -0.8812868  0.3292315
  </code></pre>
  
  <p>The following line also produces 1000 draws, but now the mean varies between 0 and 100 for each observation.</p>
  
  <pre><code>rnorm(1000,c(0,100),1)
  ## [1]  -1.12269954  98.83932359   0.07735428  99.91774166   0.60986243 101.50529435 
  </code></pre>
  
  <p>So what happens in this case? What is the general logic?</p>
  
  <pre><code>rnorm(1000,c(0,100),c(1,10))
  </code></pre>
  
  <p>Thank you for the link to vector recycling, that is one piece I was missing. Another is <em>which</em> combination of means and standard deviation are used. For example, does </p>
  
  <pre><code>rnorm(1000,c(0,100),c(1,10))
  </code></pre>
  
  <p>ever draw from the normal distribution with mean 0 and standard deviation 10? The below answer addresses this. </p>