title: how do I search for columns with same name, add the column values and replace these columns with same name by their sum? Using R
body: <p>I have a data frame where some consecutive columns have the same name. I need to search for these, add their values in for each row, drop one column and replace the other with their sum.
  without previously knowing which patterns are duplicated, possibly having to compare one column name with the following to see if there's a match.</p>
  
  <p>Can someone help?</p>
  
  <p>Thanks in advance.</p>