Sorry for the non-descriptive title but I don't know whether there's a word for what I'm trying to achieve.
Let's assume that I have a list of names of different classes like
c( '1', '2', '3', '4')
I'd like to generate all possible permutation pairs out of this so that there are no reverse-duplicates. So what I'd like to have is something like
'1' '2'
'1' '3'
'1' '4'
'2' '3'
'2' '4'
'3' '4'
Note that I don't have e.g. '2' '1'
because I already have '1' '2'
. Is there an easy way to achieve this in R?