title: how to count and remove similar strings across columns
body: <p>I have a data with many columns . for example this is with three columns </p>
  
  <pre><code>df&lt;-structure(list(V1 = structure(c(5L, 1L, 7L, 3L, 2L, 4L, 6L, 6L
  ), .Label = c("CPSIAAAIAAVNALHGR", "DLNYCFSGMSDHR", "FPEHELIVDPQR", 
  "IADPDAVKPDDWDEDAPSK", "LWADHGVQACFGR", "WGEAGAEYVVESTGVFTTMEK", 
  "YYVTIIDAPGHR"), class = "factor"), V2 = structure(c(5L, 2L, 
  7L, 3L, 4L, 6L, 1L, 1L), .Label = c("", "CPSIAAAIAAVNALHGR", 
  "GCITIIGGGDTATCCAK", "HVGPGVLSMANAGPNTNGSQFFICTIK", "LLELGPKPEVAQQTR", 
  "MVCCSAWSEDHPICNLFTCGFDR", "YYVTIIDAPGHR"), class = "factor"), 
      V3 = structure(c(4L, 3L, 2L, 4L, 3L, 1L, 1L, 1L), .Label = c("", 
      "AVCMLSNTTAIAEAWAR", "DLNYCFSGMSDHR", "FPEHELIVDPQR"), class = "factor")), .Names = c("V1", 
  "V2", "V3"), class = "data.frame", row.names = c(NA, -8L))
  </code></pre>
  
  <p>-The first column, we don't look at any other column, we just count how many strings there are and keep the unique one </p>
  
  <ul>
  <li><p>The second column, we keep the unique and also we remove those that were already in the first column </p></li>
  <li><p>The third column, we keep the unique and we remove the strings that were in the first and second column </p></li>
  </ul>
  
  <p>This continues for as many columns as we have </p>
  
  <p>for example for this data, we will have the following </p>
  
  <pre><code> Column 1              Column 2                    Column 3
  LWADHGVQACFGR
  CPSIAAAIAAVNALHGR     LLELGPKPEVAQQTR              AVCMLSNTTAIAEAWAR
  YYVTIIDAPGHR          GCITIIGGGDTATCCAK 
  FPEHELIVDPQR          HVGPGVLSMANAGPNTNGSQFFICTIK   
  DLNYCFSGMSDHR         MVCCSAWSEDHPICNLFTCGFDR   
  IADPDAVKPDDWDEDAPSK     
  WGEAGAEYVVESTGVFTTMEK   
  </code></pre>