title: How can I extract the rows from a large data set by common IDs and take the means of these rows and make a column having these IDs
body: <p>I know it is a very silly question but I could not sort it out that is why asking...
  How can I extract the rows from a large data set by common IDs and take the means of these rows and make a column having these IDs as rownames.
  e.g.</p>
  
  <pre><code>IDs Var2    
  Ae4 2       
  Ae4 4
  Ae4 6
  Bc3 3   
  Bc3 5   
  Ad2 8
  Ad2 7
  
  OutPut
  Var(x)
  Ae4 4
  Bc3 4
  Ad2 7.5
  </code></pre>