Finding A List of All Combinations of 6 Numbers That Add up to 10
问题 So I've seen similar versions of this question asked before (Getting all combinations which sum up to 100 using R) but I'm struggling to find a way to figure out what I need to run specifically. I'm trying to create a list in R of all the different combinations of 6 numbers that add up to 10. However, I want to include 0s and repeats of the same # in the row. So it would look something like this: 10 0 0 0 0 0 9 1 0 0 0 0 8 2 0 0 0 0 I've tried running the following: C = t(restrictedparts(10,6