title: identifying location of NA values in a data frame by ID (not row number) and column name
body: <p>I have a survey where some questions were not answered by some participants. Here is a simplified version of my data</p>
  
  <pre><code>df &lt;- data.frame(ID = c(12:16), Q1 = c("a","b","a","a",NA), 
        Q2 = c("a","a",NA,"b",NA), Q3 = c(NA,"a","a","a","b"))
  df
  </code></pre>
  
  <p>I would like to see which ID numbers did not answer which questions. The following code is very close to the output I want but identifies the subject by row number - I would like the subject identified by ID number</p>
  
  <pre><code>table(data.frame(which(is.na(df), arr.ind=TRUE)))
  </code></pre>
  
  <p>right now the output shows that rows 1,3,5 did not answer at least one question and it identifies the column with the missing value. I would like it show me the same thing but with ID numbers 12,14,16. It would be a bonus if you could have the column names (eg Q1,Q2,Q3) in the output as well instead of column number.</p>