[R] Pseudo-random numbers between two numbers

guox at ucalgary.ca guox at ucalgary.ca
Wed Mar 11 00:01:45 CET 2009

Please forget the last email I sent with the same subject.
I would like to generate pseudo-random numbers between two numbers using
R, up to a given distribution,
for instance, norm. That is something like rnorm(HowMany,Min,Max,mean,sd)
over rnorm(HowMany,mean,sd).
I am wondering if

qnorm(runif(HowMany, pnorm(Min,mean,sd), pnorm(Max,mean, sd)), mean, sd)

is good. Any idea? Thanks.

More information about the R-help mailing list