Oops, sorry. Sloppy translation from the R window
sample(-4:4,50,TRUE,prob=c(pnorm(-4:2,2,0.15)pnorm(c(3,4),2,0.15,lower.tail=FALSE))
Jim ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.