Re: [R] Choosing a random number between x and y

2009-02-10 Thread Vie
Thanks a lot everyone. You've been a great help! -- View this message in context: http://www.nabble.com/Choosing-a-random-number-between-x-and-y-tp21914106p21930844.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] Choosing a random number between x and y

2009-02-10 Thread Bernardo Rangel Tura
On Mon, 2009-02-09 at 06:40 -0800, Vie wrote: > 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 fun

Re: [R] Choosing a random number between x and y

2009-02-09 Thread Tony Breyal
Hi Vie, Something like the following should be fine: ## R Start... > n<-1 > my.min <- 0 > my.max <- 0.7 > runif(n, my.min, my.max) [1] 0.01145260 ## R end. see ?runif for details. Hope that helps a little, Tony Breyal On 9 Feb, 14:40, Vie wrote: > Hi, > > Ive been trying to find a function tha

Re: [R] Choosing a random number between x and y

2009-02-09 Thread Christos Hatzis
t; To: r-help@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 examp

Re: [R] Choosing a random number between x and y

2009-02-09 Thread Jorge Ivan Velez
Hi Vie, Take a look at ?runif. set.seed(123) > runif(1,0,0.5) [1] 0.1437888 > runif(1,0,0.7) [1] 0.5518136 HTH, Jorge On Mon, Feb 9, 2009 at 9:40 AM, Vie wrote: > > Hi, > > Ive been trying to find a function that will allow me to pull out a number > between a minimum and maximum threshold. >

Re: [R] Choosing a random number between x and y

2009-02-09 Thread Marc Schwartz
on 02/09/2009 08:40 AM Vie wrote: > 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 w

Re: [R] Choosing a random number between x and y

2009-02-09 Thread Dieter Menne
Vie bham.ac.uk> writes: > > 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 t

Re: [R] Choosing a random number between x and y

2009-02-09 Thread Rowe, Brian Lee Yung (Portfolio Analytics)
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

Re: [R] Choosing a random number between x and y

2009-02-09 Thread Doran, Harold
See ?runif > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Vie > Sent: Monday, February 09, 2009 9:41 AM > To: r-help@r-project.org > Subject: [R] Choosing a random number between x and y > > >

Re: [R] Choosing a random number between x and y

2009-02-09 Thread Greg Snow
ilto:r-help-boun...@r- > project.org] On Behalf Of Vie > Sent: Monday, February 09, 2009 7:41 AM > To: r-help@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 > nu

Re: [R] Choosing a random number between x and y

2009-02-09 Thread jdeisenberg
Vie wrote: > > 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'm no R expert, but this should give you n uniformly distributed

[R] Choosing a random number between x and y

2009-02-09 Thread Vie
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