How to calculate the number of combinations?

Possible duplicate:
How to calculate the combination and permutation in R?

When I try to calculate combinations in R using the Combinat package and the combn , it gives me all possible combinations. But I just want to return the number of combinations, i.e. I want to get 45 in the case of 10C2. What should I do?

+4
source share
1 answer

Use the basic choose function:

 choose(10,2) #[1] 45 
+25
source

All Articles