Look at the clt.examp function in the TeachingDemos package, it generates samples from normal, uniform, gamma (default exponential), and beta (default U-shaped) distributions and plots histograms of the means along with a reference line of a normal distribution with the same mean and sd. The default sample size is 1 which will show the shape of the population, then you can run it again with larger values of n to show how all of them become more and more normal (the exponential is the slowest).
Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] 801.408.8111 > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > project.org] On Behalf Of Jörg Groß > Sent: Wednesday, October 15, 2008 1:49 PM > To: r-help@r-project.org > Subject: [R] plot - central limit theorem > > Hi, > > > Is there a way to simulate a population with R and pull out m samples, > each with n values > for calculating m means? > > I need that kind of data to plot a graphic, demonstrating the central > limit theorem > and I don't know how to begin. > > So, perhaps someone can give me some tips and hints how to start and > which functions to use. > > > > thanks for any help, > joerg > > ______________________________________________ > 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. ______________________________________________ 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.