title: Distance between vectors with missing values
body: <p>For vectors <code>A</code> and <code>B</code>, euclidean distance is:<code>sqrt((A1-B1)^2+(A2-B2)^2+...+(An-Bn)^2)</code></p>
  
  <pre><code>A &lt;- c(5, 4, 3, 2, 1, 1, 2, 3, 5)
  B &lt;- c(1, 0, 6, 4, 3, 2, 3, 1, 3)
  dist(rbind(A,B), method= "euclidean") 
  7.681146
  </code></pre>
  
  <p>How is distance calculated when vectors A and B contain missing values? Here is an example: R output for distance is <code>8.485281</code> but how is it calculated?</p>
  
  <pre><code>A &lt;- c(5, NA, NA, NA, 1, 1, 2, 3, 5)
  B &lt;- c(1, 0, 6, NA, NA, NA, NA, 1, 3)
  dist(rbind(A,B), method= "euclidean")
  8.485281
  </code></pre>