You could use sample eg. > sample(1:10,5,replace=T) [1] 1 5 4 6 3
but there may be a more approriate function. On Dec 7, 2007 8:59 AM, kexinz <[EMAIL PROTECTED]> wrote: > > I'm a beginner of R. > I can use runif() to generate uniformly distributed numbers, but I don't > know which function can generate uniformly distributed random integers, or > what kind of method do? > Thanks! > -- > View this message in context: > http://www.nabble.com/how-to-generate-uniformly-distributed-random-integers-tf4960778.html#a14208376 > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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. > [[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.