title: Return list of column names with missing (NA) data for each row of a data frame in R
body: <p>I am trying to create a list of data with NA values for each ID# in a dataframe so I can keep track of missing data. I have a dataframe where each row is an ID# and each column is a variable name. Each ID# may have different missing data so I want to condense this information down into a two column table. Currently, my table looks something like this:</p>
  <pre><code>ID  Var1 Var2 Var3 Var4 Var5
  1   10   T    NA   2    NA
  2   15   F    50   2    NA
  3   12   NA   41   2    NA
  4   NA   NA   NA   1    NA
  5   NA   F    NA   NA   NA
  ...
  </code></pre>
  <p>I am hoping to get output that looks something like this:</p>
  <pre><code>ID   Missing Variables
  1    Var3, Var5
  2    Var5
  3    Var2, Var5
  4    Var1, Var2, Var3, Var5
  5    Var1, Var3, Var4, Var5
  ...
  </code></pre>
  <p>I'm confused how I would return to column name for each missing data entry. I know you can probably do something like this with a for loop but beyond that I get a little lost.  Any help is much appreciated!</p>