Here is another nice way of doing it: replicate(10, rnorm(20)) # this will give you 10 columns of vectors with 20 random variables taken from the normal distribution.
If any one got a faster way of doing this, please let me know. Tal galili On Tue, Aug 25, 2009 at 1:30 AM, Rolf Turner <r.tur...@auckland.ac.nz>wrote: > > On 25/08/2009, at 10:17 AM, Peng Yu wrote: > > Hi, >> >> I did a search but I was able to find how to generate a random matrix. >> Can somebody let me know how to do it? >> > > Uhhh, generate some random numbers and then arrange them in a matrix? > > ?matrix > ?runif > ?rnorm > ?rgamma > . > . > . > > cheers, > > Rolf Turner > > ###################################################################### > Attention:\ This e-mail message is privileged and confid...{{dropped:9}} > > > ______________________________________________ > 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. > -- ---------------------------------------------- My contact information: Tal Galili Phone number: 972-50-3373767 FaceBook: Tal Galili My Blogs: http://www.r-statistics.com/ http://www.talgalili.com http://www.biostatistics.co.il [[alternative HTML version deleted]] ______________________________________________ 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.