title: In R, what command do I use to generate a dataset consisting of the means of all column vectors in a dataset?
body: <p>Some background: First, I wanted to generate multiple sets of samples (each of sample size n) from a uniform (0,1) distribution in [R]. I know that the command for generating from a uniform distribution is runif(n=x) for some sample size x, e.g. if I wanted sample size 20 the command would be</p>
  
  <blockquote>
    <p>runif(n=20)</p>
  </blockquote>
  
  <p>Next, I used the command</p>
  
  <blockquote>
    <p>replicate( 100, runif(n=20))</p>
  </blockquote>
  
  <p>This generated a double matrix of values which I could then convert into a dataset with 100 columns and 20 rows.</p>
  
  <p>Is it possible for me to generate a dataset consisting of the sample means of all the column vectors (the sample means of the 100 sets taken from the uniform distribution)?</p>
  
  <p>Thank you for your help.</p>