[R] getting random integers
Hans Ekbrand
hans at sociologi.cjb.net
Thu Apr 29 18:39:28 CEST 2010
I want 100 integers. Each integer, x, can be in the range 1 =< x => 10.
Does the following code give 1 and 10 the same chances to be selected as
2:8?
round(runif(100, min = 1, max = 10))
--
Hans Ekbrand
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100429/5eeb7e8f/attachment.bin>
More information about the R-help
mailing list