Skip to content
Prev 169809 / 398506 Next

Choosing a random number between x and y

How about this:
[1] 0.4806179
[1] 0.1789742


-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of Vie
Sent: Monday, February 09, 2009 9:41 AM
To: r-help at r-project.org
Subject: [R] Choosing a random number between x and y



Hi,

Ive been trying to find a function that will allow me to pull out a
number
between a minimum and maximum threshold.

I want a random decimal number between, for example, 0 and 0.5 or 0 and
0.7.
I've been searching everywhere for a function that will allow me to do
this
in R, but I have yet to be successful. Any help would be much
appreciated.

Thanks in advance