[R] Uniform Distribution

Gavin Simpson gavin.simpson at ucl.ac.uk
Wed Sep 8 15:45:12 CEST 2010


On Wed, 2010-09-08 at 06:36 -0700, Alaios wrote:
> Hello,
> I would like to uniformly distribute values from 0 to 200. Can someone help me 
> find the appropriate uniform distribution generator?
> 
> I would like to thank you in advance for your help.
> 
> 
> Best Regards
> Alex

?runif

runif(10, min = 0, max = 200)

will give you 10 numbers uniformally distributed on the interval 0, 200.

HTH

G

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-help mailing list