Skip to content
Back to formatted view

Raw Message

Message-ID: <1783.68.145.107.33.1236726105.squirrel@68.145.107.33>
Date: 2009-03-10T23:01:45Z
From: guox at ucalgary.ca
Subject: Pseudo-random numbers between two numbers

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.
-james