title: How to group similar rows in R
body: <p>I have a table as follows:</p>
  
  <pre><code>   Rptname     Score
  
      Bebo23        8
      Bebo22        9
      Bebo19        10
      Alt88         12
      Alt67         11
      Jimm          5
      Jimm2         7
  </code></pre>
  
  <p>etc.
  I would like to sum into groups those rows that are similar. ie</p>
  
  <pre><code>     Bebo         27
       Alt          22
       Jimm         12
  </code></pre>
  
  <p>The beginning of the row name is always the similar part to group on but the number of characters that are similar can vary. I appreciate that I will have to define the groups and probably using some kind of regular expression but I'm not sure how to group and sum on this basis. Thanks for your help in advance</p>