title: How to show indexes of NAs?
body: <p>I have the piece to display NAs, but I can't figure it out. </p>
  
  <pre><code>try(na.fail(x))
  &gt; Error in na.fail.default(x) : missing values in object
  # display NAs
  myvector[is.na(x)]
  # returns
  NA NA NA NA
  </code></pre>
  
  <p>The only thing I get from this the length of the NA vector, which is actually not too helpful when the NAs where caused by a bug in my code that I am trying to track. How can I get the index of NA element(s) ?</p>
  
  <p>I also tried: </p>
  
  <pre><code>subset(x,is.na(x))
  </code></pre>
  
  <p>which has the same effect.</p>
  
  <p>EDIT: </p>
  
  <pre><code>y &lt;- complete.cases(x)
  x[!y]
  # just returns another
  NA NA NA NA
  </code></pre>