How many combinations of 4 items in a set of 10 The question from the textbook is as follows: 
A store stocks 4 types of balls red, blue, green, and orange balls.  As the customer, you are asked to 10 balls. But you must at least one of each type of ball.  
How many different ways can the different balls to buy be selected?
The text says the solution is 84. 
I tried to compute it following  Combinations with Repetition. 
https://www.mathsisfun.com/combinatorics/combinations-permutations.html
Assuming 4 unique balls initially. Gave me the following expression. 
$$ CWRep(n,r)=\left( \frac { (r+n-1)! }{ r!(n-1)! }  \right) \\ CWRep(6,4)=126 $$
Not sure what I am doing wrong here.
 A: Rather than blindly following formulas included on sheets, you should learn to understand how the formula was derived in the first place.  This allows you to see why using it is correct in some scenarios and incorrect in others.  The technique of Stars-and-bars (or as in the case of the link you included... arrows and circles?) is useful for problems like this.
In order to attempt to avoid confusion with the notation you saw and letters meaning different things than before, I'll write the formula in terms of balls and bins where the number of balls is $\text{B}_{\text{alls}}$ and the number of bins is $\text{B}_{\text{ins}}$.  The end result is that to find the number of ways of distributing $\text{B}_{\text{alls}}$ identical balls into $\text{B}_{\text{ins}}$ distinct bins with no further restriction there are:
$$\binom{\text{B}_{\text{alls}}+\text{B}_{\text{ins}}-1}{\text{B}_{\text{ins}}-1}=\dfrac{(\text{B}_{\text{alls}}+\text{B}_{\text{ins}}-1)!}{\text{B}_{\text{alls}}!(\text{B}_{\text{ins}}-1)!}$$
Note, that if you try studying from many different sources, you will see some people write the problem where there are $n$ balls and $r$ bins and you will find other people who write the problem where there are $r$ balls and $n$ bins, both of which arrive at very similar but slightly different expressions for the final result.  Make sure you keep in mind what each variable in the formula represents.
The standard explanation for why this formula is what it is is done again through the explanation of Stars and Bars.  Here, we take the balls, represent them as stars, and then take as many bars as are necessary to separate between the bins.
For instance, with $6$ balls and $3$ bins we have as an example outcome the following arrangement: $\star\mid\star\star\mid\star\star\star$ which corresponds to one ball going in the first bin, two balls going in the second bin, and three stars going in the third bin.  That is to say, the number of stars to the left of the left-most bar corresponds to the number of balls going in the first bin, the number of stars between the first and second bar corresponding to the number of balls going into the second bin, and so on until talking about the number of balls going into the last bin as the number of stars to the right of the right-most bar.  Notice, we need exactly one fewer bar than the number of bins, hence why we used $\text{B}_{\text{ins}}-1$ in our formula.
Now... the number of arrangements of $\text{B}_{\text{alls}}$ number of stars and $\text{B}_{\text{ins}}-1$ number of bars will be $\binom{\text{B}_{\text{alls}}+\text{B}_{\text{ins}}-1}{\text{B}_{\text{ins}}-1}$ but included in that count are arrangements like $\mid\star\star\star\star\star\star\mid$ which correspond to zero balls going in the first bin, all six balls going in the second bin, and zero balls going in the third bin.
Instead, you are interested in counting in how many ways we can do this where there is at least one ball going in each bin.
You can do this a number of ways.  The first and quickest way is that rather than arranging the stars and bars all in a line with no restriction, let us instead place the stars and then let us pick which spaces between the stars to place the bars.  There are $\text{B}_{\text{alls}}-1$ number of spaces between stars in which we can place them and we need to pick $\text{B}_{\text{ins}}-1$ of those spaces to put bars into, order of selection not mattering.
In doing so, we will have guaranteed that no bar is placed next to another bar and we will have guaranteed that there is at least one star to the left of the leftmost bar and at least one star to the right of the rightmost bar.
This gives us a count of $$\binom{\text{B}_{\text{alls}}-1}{\text{B}_{\text{ins}}-1}$$
An alternative approach is that using the first result, we can "ahead of time go ahead and place one ball into each bin" and then just ask the question about how we place the remaining balls with no further restriction on the remaining balls.
This gives us an answer of $$\binom{(\text{B}_{\text{alls}}-\text{B}_{\text{ins}})+\text{B}_{\text{ins}}-1}{\text{B}_{\text{ins}}-1}$$ which simplifies to the same answer as before of $\binom{\text{B}_{\text{alls}}-1}{\text{B}_{\text{ins}}-1}$

Before you complain and say "But I'm taking balls in my problem, not placing them" it is a related problem.  Imagine if you would that you need to pay for your balls you are getting and you do so by putting a coin in the box for the appropriate color.  The boxes in which you put your coins are the "bins" in this problem and the coins you are placing are the "balls" from the explanation above.

Actually plugging the numbers in:
$$\binom{10-1}{4-1}=\binom{9}{3} =\dfrac{9!}{3!6!}= 84$$
Note: $\binom{10-1}{4}=126$, the answer you had arrived at.  I suspect then that you had made an arithmetic error or had gotten your $n$'s and $r$'s confused.
