Skip to content

Pseudo-random numbers between two numbers

1 message · guox at ucalgary.ca

#
I would like to generate pseudo-random numbers between two numbers using
R, up to a given distribution,
for instance, rnorm.
That is something like rnorm(HowMany,Min,Max,mean,sd) over
rnorm(HowMany,mean,sd).

I am wondering if

dnorm(runif(HowMany, Min, Max), mean, sd)

is good. Any idea? Thanks.
-james