title: average of specific rows in a file
body: <p>I have 6 rows in files. I need to find average only of specific rows in a file and the others should be left as they are. The average should be calculated for A1 and A2, B1 and B2, other lines should stay as they are</p>
  
  <p>Input:</p>
  
  <pre><code>A1  1   1   2
  A2  5   6   1   
  A3  1   1   1   
  B1  10  12  12
  B2  10  12  10
  B3  100 200 300
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>A1A2  3    3.5   1.5     
  A3    1    1     1
  B1B2  10   12    11    
  B3    100  200   300
  </code></pre>
  
  <p>EDIT: There are <code>n</code> columns in total</p>