as.data.frame(replicate(20, rnorm(500))) Arun Kumar Saha a écrit :
> Dear r-users, > > suppose I have n normal distributions with parameter N(0,i) i=1,2,.......,n > respectively. > > Now I want to generate 500 random number for each distribution. And want to > put all 500*n random numbers > in a single data frame. > > I tried with following code: > > >>n=20 > > random = data.frame(n) > for ( i in 2: length) > { > random[,i] = random(500,mean=0,sd=i) > } > > but while executing this I am getting errors. > > Can anyone give me any suggestion? > Thanks and regards > Arun > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > -- ------------------------------------------------------------------- [EMAIL PROTECTED] CNRS UMR 8090 - http://www-good.ibl.fr Génomique et physiologie moléculaire des maladies métaboliques I.B.L 2eme etage - 1 rue du Pr Calmette, B.P.245, 59019 Lille Cedex Tel : 33 (0)3.20.87.10.44 Fax : 33 (0)3.20.87.10.31 ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html