title: removing duplicate words in a row
body: <p>I have a column in table as below</p>
  
  <pre><code>    Col1
      ========================
      "No","No","No","No","No"
      "No","No","No"
       Yes
       No
      "Yes","Yes","Yes","Yes"
      "Yes","No","Yes", "Yes
  </code></pre>
  
  <p>I am trying to remove duplicate No and Yes and create column like this</p>
  
  <pre><code>            Col1
      ========================
       No
       No
       Yes
       No
       Yes
       Yes, No
  </code></pre>
  
  <p>I started with </p>
  
  <pre><code>     kickDuplicates &lt;- c("No","Yes")
       # create a list of vectors of place names
       broken &lt;- strsplit(Table1$Col1, ",")
       # paste each broken vector of place names back together
       # .......kicking out duplicated instances of the chosen names
       Table1$Col1 &lt;- sapply(broken, FUN = function(x)  paste(x[!duplicated(x)  
       | !x %in% kickDuplicates ], collapse = ", "))
  </code></pre>
  
  <p>But this is not working, i get the same original column with duplicates as before, can anybody tell me where I am going wrong ?</p>
  
  <pre><code>c("\"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\"", 
  "\"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"Yes\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\"", 
  "\"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\"", 
  "\"No\", \"No\"", "\"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\", \"No\"", 
  "No")
  </code></pre>