Hello, i need some help to use urnsamples from the package "prob".
At the moment i use it in this way A<-as.matrix(urnsamples(1:25, size = 7,ordered=FALSE,replace=TRUE)) So I get the numbers 1 to 25 and choose 7 of them, but it is possible to get one number more than one time. But I want additionally that I get a number not more than three times. So for example "1111222" is no combination, but "1112223" is allowed. I know that it should be possible to create A in my way and than delete all "wrong" combinations, but i will work also with bigger size than 7, so the Matrix A will get to large. So my question is, if there is a option to give urnsamples the limit to choose every object not more than three times? Or is there another way to get the combinations I want. Thanks, Michelle Galla -- View this message in context: http://r.789695.n4.nabble.com/Help-with-urnsamples-and-all-possible-combination-tp4707560.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.