Dear Reuben, [snip]
> my questions now are... how would I generalize functions 3 and 4 for m > And, which of the 4 functions would be best for varying ranges of > n and m? I am expecting values for n to range between 1 and 1e3, while > m will range between 1 and 1e6. > > Reuben > Regarding your 2nd question, for the values of n and m that you request, the answer is "none". The number of combinations is astronomically large. To get an idea, try library(prob) nsamp( n, m, ordered = FALSE, replace = TRUE ) for assorted values of n and m. Bearing the above in mind, it may be useful to think carefully about _why_ it is desired to have all possible combinations. In some circumstances, it is good enough to randomly generate combinations and draw inferences from a sampling distribution of some sort associated with the problem. Good luck. Jay *************************************************** G. Jay Kerns, Ph.D. Associate Professor Department of Mathematics & Statistics Youngstown State University Youngstown, OH 44555-0002 USA Office: 1035 Cushwa Hall Phone: (330) 941-3310 Office (voice mail) -3302 Department -3170 FAX E-mail: gke...@ysu.edu http://www.cc.ysu.edu/~gjkerns/ ______________________________________________ R-help@r-project.org mailing list 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.