title: Rcorr NA/Nan/Inf in foreign function call
body: <p>I am reading in data features</p>
  
  <pre><code>data_features&lt;-as.matrix(read.table("file.csv", header=TRUE,fill=TRUE));
  </code></pre>
  
  <p>Then converting to matrix and getting rid of Inf data using library "functional"</p>
  
  <pre><code>dd &lt;-as.matrix(data_xls)
  dd[apply(dd, 1, Compose(is.finite, all)),]
  </code></pre>
  
  <p>Then I am executing rcorr:</p>
  
  <pre><code>rcorr(dd)
  </code></pre>
  
  <p>And that results in: </p>
  
  <pre><code>Error in rcorr(dd) : NA/NaN/Inf in foreign function call (arg 1)
  In addition: Warning message:
  In storage.mode(x) &lt;- "double" : NAs introduced by coercion
  </code></pre>
  
  <p>Without the use of Compose from functional, I would have this problem when 
  creating a matrix. Currently, I don't have it when creating the matrix but 
  afterwards when executing rcorr.</p>