I know function combn
can generate all the possible combinations. However, if the total number of members is large, this is really time-consuming and memory-consuming.
My goal is to randomly pick combinations from all the possible combinations. For example, I want 5000 distinct triple set of members from a pool of 3000 members. I think I don't need to generate all possible combinations and choose 5000 from them. But seems that R doesn't have a ready-to-use function to do this. So how to deal with this problem?