title: Returning incorrect logical from is.nan
body: <p>I am analyzing microarray data from a publicly available database, and my output is a log-ratio matrix comparing experimental data to controls. I have discovered that one of my columns is populated with <code>NaN</code> values due to the fact that this treatment does not have a corresponding control. My data frame's (<code>fc_initial</code>) dimensions are 9049 x 647.</p>
  
  <pre><code>&gt; dim(fc_initial)
  [1] 9049  647
  </code></pre>
  
  <p>the column that is populated by NaN is the 580th column</p>
  
  <pre><code>head(fc_initial[,580])
  # [1] NaN NaN NaN NaN NaN NaN
  
  summary(is.nan(fc_initial[,580]))
  #    Mode    TRUE    NA's 
  # logical    9049       0 
  </code></pre>
  
  <p>When I try to examine this for all columns using <code>apply</code>, R incorrectly returns all <code>FALSE</code> for this column.</p>
  
  <pre><code>fc_num &lt;- apply(fc_initial, 2, is.nan)
  summary(fc_num[ ,580])
  #    Mode   FALSE    NA's 
  # logical    9049       0 
  </code></pre>
  
  <p>I have visually confirmed this using view for both <code>fc_initial</code> and <code>fc_num</code>, and I have double checked that I am looking for the right column using <code>which()</code>.</p>
  
  <pre><code>which(fc_num, arr.ind = TRUE)
  #  row col
  </code></pre>
  
  <p><code>which</code> returns no cells showing as <code>TRUE</code>.</p>
  
  <p>What am I missing? Why is R returning a column of <code>FALSE</code> for a column of values I have visually confirmed to be <code>TRUE</code>?</p>