[BioC] random number->random integer
Seth Falcon
sfalcon at fhcrc.org
Thu Nov 30 01:30:02 CET 2006
"D.Enrique ESCOBAR ESPINOZA" <escobarebio at yahoo.com> writes:
> Hi
> I want to generate a random integer from 1 to 654,
> is there any function that can provide a random real between 0&1
> [0,1]
> that I can multiply by 654 and perform the ceiling() or floor() to
> get an integer from that?
This is more of an R-help question.
If you want a random integer between 1 and 654:
sample(1:654, 1)
You may also be interested in runif()
+ seth
More information about the Bioconductor
mailing list