How to calculate number of combinations?
36,647
Use the base function choose
:
choose(10,2)
#[1] 45
Author by
Admin
Updated on February 02, 2020Comments
-
Admin over 4 years
Possible Duplicate:
How to calculate combination and permutation in R?When I try to calculate combinations in R using the
Combinat
package and thecombn
command it gives me all possible combinations. But I just want to return the number of combinations, i.e. I want to get 45 in case of 10C2. What should I do?