title: Comparing distribution of two vectors
body: <p>I have 5 different vectors and then a vector I want to compare them to. What I need is to get the most similiar vector out of the 5 different ones.</p>
  
  <p>The vectors are quite long, so I will just show a little of it:</p>
  
  <pre><code># Vector to compare to:
  v1 &lt;- c(0.2500, 0.4375, 0.1250, 0.3125, 0.0000, 0.5625, 0.1250, 0.1875, 0.1875, 0.1875, 0.1875)
  
  # One of vectors to compare
  v2 &lt;- c(2, 1, 0, 1, 1, 1, 1, 0, 2, 1, 2)
  
  # Another of vectors to compare: 
  v3 &lt;- c(5, 0, 3, 1, 1, 2, 1, 2, 0, 1, 2)
  </code></pre>
  
  <p>Practically what I need to do is a statistical test to compare the distribution of histograms given by those vectors and tell which is the closest. I tried to use <code>ks.test</code>, but it had a problem with duplicate values in vectors and p-value returned was like 0.0000000000001.. Any ideas how to do that (except visually)?</p>