Message-ID: <CAOc37u4k1Pc=qMnbiOGsr2kf4CyoMG7qqBgr+qVwoMdzMi5aHQ@mail.gmail.com>
Date: 2012-03-28T19:17:29Z
From: Somnath Dhar
Subject: How to get all possible combinations?
Dear all, suppose I have a vector with elements as:
Vec <- c(2,3,4,5,6)
Now I want to have all possible combination of length 3 using those
elements and without any repetition. Like, I want to have 1
possibility like 2-3-4 but not 3-2-4.
Can somebody guide me how to achieve that in R?
Thanks for your help.