I'm trying to create 100 pairs from a vector with 200 values. I have constructed a vector following a normal distribution as follows:
vetor=rnorm(200,mean=30,sd=6)
And now I want to extract 100 pairs of these values, but without repeating any of them. I tried to do it as follows:
pares=replicate(100,sample(vetor,2,replace=FALSE))
In this case, replace=FALSE
prevented equal pairs from being sampled, but some vector values entered more than one pair, and other values did not match at all.
What I want is for all values to be part of some pair and for all pairs to be different.
Could you please help me?