[R] Random Integers

Paul Smith phhs80 at gmail.com
Sun Feb 25 15:24:06 CET 2007


> Is there an R function to generate random integers?  Thanks in advance.

For example, if you want 5 random integers from the sequence 1:50, you
can do the following:

sample(1:50,5)

Paul



More information about the R-help mailing list