[R] Random Integer Number in Uniform Distribution

Nick Sabbe nick.sabbe at ugent.be
Mon Oct 25 08:50:52 CEST 2010


Check ?sample.


Nick Sabbe
--
ping: nick.sabbe at ugent.be
link: http://biomath.ugent.be
wink: A1.056, Coupure Links 653, 9000 Gent
ring: 09/264.59.36

-- Do Not Disapprove




-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Gundala Viswanath
Sent: maandag 25 oktober 2010 8:38
To: r-help at stat.math.ethz.ch
Subject: [R] Random Integer Number in Uniform Distribution

Is there a way to do it? At best what I can achieve
is non integer:

> runif(10, min=1, max=100)
 [1] 51.959151 56.654146 63.630251  3.172794  4.073018 11.977437 86.601869
 [8] 75.788618 11.734361  6.770962


-G.V.

______________________________________________
R-help at 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.



More information about the R-help mailing list