search for: tuplesums

Displaying 1 result from an estimated 1 matches for "tuplesums".

2011 Oct 29
4
R help with different combinations of vectors of different sizes
Hi, I am trying to get different combinations of a vector of different size and find their sum. For example, if I have a vector (i,j) where i and j can be anything from 0 to 5, i get these combinations (0,0), (0,1), (1,0), (1,1), (2,0), ...... (5,5) and find sum of these as 0, 1, 1, 2, ..... , 10. I used outer functions to get this and it worked. What if I have a vector (i,j,k) where all i, j ,