Or use the replicate function (which is basically a wrapper for lapply). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111
> -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of jim holtman > Sent: Thursday, March 18, 2010 9:53 AM > To: Helena > Cc: r-h...@stat.math.ethz.ch > Subject: Re: [R] IRT simulation repeated > > result <- lapply(1:100, yourFunction) > > On Thu, Mar 18, 2010 at 9:05 AM, Helena <helenaguchen...@hotmail.com> > wrote: > > > Hello R: > > i work on an IRT simulation research. I've written a code to > generate a > > single dataset.As i will repeat simulating the data 100 times under > every > > condition, how can i write the R code to make it run the single > simulation > > code 100 times and save the generate results each time? > > Thanks so much~ > > > > ______________________________________________ > > 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<http://www.r- > project.org/posting-guide.html> > > and provide commented, minimal, self-contained, reproducible code. > > > > > > -- > Jim Holtman > Cincinnati, OH > +1 513 646 9390 > > What is the problem that you are trying to solve? > > [[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. ______________________________________________ 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.