d.rizopoulos at erasmusmc.nl
Wed May 13 17:26:14 CEST 2009
what about putting in a matrix, e.g.,
matrix(rnorm(1000*100), 1000, 100)
I hope it helps.
Debbie Zhang wrote:
> Dear R users,
> Can anyone please tell me how to generate a large number of samples in R, given certain distribution and size.
> For example, if I want to generate 1000 samples of size n=100, with a N(0,1) distribution, how should I proceed?
> (Since I dont want to do "rnorm(100,0,1)" in R for 1000 times)
> Thanks for help
> Looking to change your car this year? Find car news, reviews and more
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Department of Biostatistics
Erasmus University Medical Center
Address: PO Box 2040, 3000 CA Rotterdam, the Netherlands
More information about the R-help