Hi,
If I understand correctly, you can just simply keep generating norm
values till you don't get the 100 appropriate one. I am pretty new to
R, but here you go with a function that does this:
rnorm25 <- function(mean,sd,X){
i = 0;
ret = c()
while ( i < 100 ){
r = rnorm(1,mean,sd)
On 04/08/2011 12:03 PM, Vijayan Padmanabhan wrote:
Hi
I am looking at generating a random dataset of say 100 values fitting in a
normal distribution of a given mean and SD, I am aware of rnorm
function. However i am trying to build into this function one added
constraint that all the random value
2 matches
Mail list logo