N Combination R. We need to make n 5. The following diagram shows the formula for combination.
Each group contains r objects which can be arranged in r. I wrote the function in r. Logical indicating if the result should be simplified to an array typically a matrix.
Number of elements to choose.
For our example of 3 scoops of ice cream from 3 tubs the number of combinations with repetition is. See the expression argument to the options command for details on how to do this. You have won first place in a contest and are allowed to choose 2 prizes from a table. However for our original question we had n 3 and r 3.
