title: R is there a way to find Inf/-Inf values?
body: <p>I'm trying to run a randomForest on a large-ish data set (5000x300).  Unfortunately I'm getting an error message as follows:</p>
  
  <pre><code>&gt; RF &lt;- randomForest(prePrior1, postPrior1[,6]
  +                    ,,do.trace=TRUE,importance=TRUE,ntree=100,,forest=TRUE)
  Error in randomForest.default(prePrior1, postPrior1[, 6], , do.trace = TRUE,  : 
    NA/NaN/Inf in foreign function call (arg 1)
  </code></pre>
  
  <p>So I try to find any NA's using :</p>
  
  <pre><code>&gt; df2 &lt;- prePrior1[is.na(prePrior1)]
  &gt; df2 
  character(0)
  &gt; df2 &lt;- postPrior1[is.na(postPrior1[,6])]
  &gt; df2 
  numeric(0)
  </code></pre>
  
  <p>which leads me to believe that it's Inf's that are the problem as there don't seem to be any NA's.  </p>
  
  <p>Any suggestions for how to root out Inf's?</p>