> -----Original Message----- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Sea Captain 1779 > Sent: Wednesday, January 28, 2009 12:04 PM > To: r-help@r-project.org > Subject: [R] Help with normal distribution in random samples... > > > Hi!!! > > First time 'R' user looking for a little assistance. Here is > what I have so > far: > > practice1 = matrix ((runif(5000, min =0, max = 12)), 100) > > which is creating 50 samples, for 100 cases, distributed > between 0-12. What > I would like is to be able to set the mean and SD so that the data is > normally distributed around lets say 7. Any help I can get > with achieving > that goal would be greatly appreciated!!! > > -Dan
Use rnorm() instead of runif(). Hope this is helpful, A different Dan Daniel J. Nordlund Washington State Department of Social and Health Services Planning, Performance, and Accountability Research and Data Analysis Division Olympia, WA 98504-5204 ______________________________________________ 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.