Skip to content
Prev 739 / 1236 Next

[R-gui] runif function

On Nov 8, 2007, at 12:07 PM, shweta wrote:

            
Looking at ?runif, you can see that the syntax for runif is: runif(n,  
min=0, max=1)

So when you call runif(N,1), what you really call is runif 
(N,min=1,max=1), so you are asking R to generate random numbers  
between 1 and 1. Of course they will all be equal to 1. Try runif(N),  
or specify both a min and a max.

PS: Not sure what this has to do with GUI though, isn't that more  
appropriate to R-help instead of r-sig-gui?
Haris Skiadas
Department of Mathematics and Computer Science
Hanover College