[R] random numbers between 0 and 1
carol white
wht_crl at yahoo.com
Wed Oct 21 21:25:56 CEST 2009
Hi,
To generate random numbers between 0 and 1, do you use rnorm followed by dnrom? for ex, for 10 variables
a = rnorm(10)
> a
[1] -0.87640764 -0.95842391 -1.33434559 -0.63844932 -1.69829393 0.80010865
[7] -0.01026882 -0.23887516 2.29912600 -1.38352143
> dnorm(a)
[1] 0.27171985 0.25202507 0.16378878 0.32538464 0.09432211 0.28966637
[7] 0.39892125 0.38772103 0.02838403 0.15320103
Regards,
More information about the R-help
mailing list