R remove duplicate data from each column
<p>I get CSV's with hundreds of different columns and would like to be able to output a new file with the duplicate values removed from each column. Everything that I have seen and tried uses a specific column. I just need each column to be unique values.</p>

<p>For Example My Data:</p>

<pre><code>df &lt;- data.frame(A = c(1, 2, 3, 4, 5, 6), B = c(1, 0, 1, 0, 0, 1), C = c("Mr.","Mr.","Mrs.","Miss","Mr.","Mrs."))
df
    A B    C
  1 1 1  Mr.
  2 2 0  Mr.
  3 3 1 Mrs.
  4 4 0 Miss
  5 5 0  Mr.
  6 6 1 Mrs.
</code></pre>

<p>I would like:</p>

<pre><code>    A B    C
  1 1 1  Mr.
  2 2 0 Mrs.
  3 3   Miss
  4 4   
  5 5    
  6 6   
</code></pre>

<p>Then I can:</p>

<pre><code>write.csv(df, file = file.path(df, "df_No_Dupes.csv"), na="")
</code></pre>

<p>So I can use it as a reference for my next task. </p>