title: Replace -Inf in dataframe with NA in R
body: <p>I have a problem in my dataframe. </p>
  
  <p><a href="https://gofile.io/?c=eNeEAL" rel="nofollow noreferrer">https://gofile.io/?c=eNeEAL</a></p>
  
  <p>I have several values with -Inf entries. When I want to use the cor-function, I always get NA because of that. So I want to replace the -Inf with NA before I use the cor-function, but I cant find a way to replace them successfully.</p>
  
  <p>I tried </p>
  
  <pre><code>dat[mapply(is.infinite, dat)] &lt;- NA
  </code></pre>
  
  <p>but it did not work.</p>
  
  <p>Any ideas how to solve this?</p>