title: Why ggscatter does not work with NA in R?
body: <p>I am trying to plot a direct correlation between A and B with <code>ggscatter</code>, however, I have many <code>NAs</code>, since the variables were not measured the same day.
  Therefore, no correlation coefficient appears. Is there any way of &quot;omitting&quot; or ignoring these NAs?</p>
  <pre><code>library(&quot;ggpubr&quot;)
  
  data&lt;- data.frame(
        Days=c(0,2,4,6,7,9,10,13,14,18,22,25,30),
        A=c(NA,678,1698,NA,3484,NA,3322,NA,3776,3279,3182,3438,2689),
        B= c(300,1000,NA,3000,NA,3500,NA,4000,NA,NA,5000,NA,NA))
  
  ggscatter(data, x = &quot;A&quot;, y = &quot;B&quot;, 
            add = &quot;reg.line&quot;, 
            conf.int = TRUE, 
            cor.coef = TRUE, 
            cor.method = &quot;pearson&quot;,
            xlab = &quot;A&quot;, ylab = &quot;B&quot;)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/Iv7hC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Iv7hC.png" alt="enter image description here" /></a></p>