Hi

Also , same problem to create discrete uniform Distribution ,

But  sample () and  runif()  not useful to generate  discrete uniform .

Ex:


> u<-round(runif(10*10,min=1,max=10),0)

> table(u)

u

 1  2  3  4  5  6  7  8  9 10

 6 10  9 10 14  6 11 14 12  8



Not useful for large number


OR

# for generate large number


dus <- sample(0:9, 100, replace = FALSE)

Error in base::sample(x, size, replace = replace, prob = prob, ...) :

  cannot take a sample larger than the population when 'replace = FALSE'


#### DO you have any suggestion my question ?


Need to generate 1000*10 number from 1:250 with discrete uniform distribution ?


Regards,

Serdar

        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to