Select column names with specific values
<p>I have a data set with the 500+ column names and 567800 rows. Each column is having values like 0,1,2,3 etc.</p>

<p>I want to create a separate column with pasting of columnnames where values are not equal to 0.</p>

<p>I tried running loop in R however I am not getting desired result and it is taking a very long time.
My data looks like this :</p>

<pre><code>DOC_ID  my_name your_name his_name our_name.....546 columns
  1        0         1         0        5   
  2        5         0         2        6   
  3        0         1         5        0
  ....
</code></pre>

<p>Desired Output is :</p>

<pre><code>DOC_ID  my_name your_name his_name our_name..     paste_column
  1        0         1         0        5       your_name our_name
  2        5         0         2        0       my_name his_name
  3        0         1         5        0       your_name his_name
  ...
</code></pre>

<p>Please suggest a faster and workable code as apply is taking a lot of time to give output</p>