title: How to check if elements in one vector are equal to another vector in R?
body: <p>I have two unequal vectors</p>
  
  <pre><code>x &lt;- c(5,5,5,5,5,5)
  y &lt;- c(5,5)
  </code></pre>
  
  <p>I want to check if all elements in x is equal to all elements in y. </p>
  
  <p>I tried <code>if(mean(x) - mean(y) == 0 &amp; sd(x) - sd(y) ==0){count=count+1}</code>
  However, I realized that some unique combination of elements can have same mean for x and y, and identical standard deviation. Any suggestions on how I can achieve this ?</p>