Hi,

Do you have ideas, how to find all those different combinations of integers (>0) that produce as a sum, a certain integer.

i.e.: if that sum is

3, the possibilities are c(1,1,1), c(1,2), c(2,1)
4, the possibilities are c(1,1,1,1),c(1,1,2),c(1,2,1),c(2,1,1),c(2,2),c(1,3),c(3,1)

etc.

Best regards,

Atte Tenkanen

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to