I have two unequal vectors
x <- c(5,5,5,5,5,5)
y <- c(5,5)
I want to check if all elements in x is equal to all elements in y.
I tried if(mean(x) - mean(y) == 0 & sd(x) - sd(y) ==0){count=count+1}
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 ?