[R] Repeating a series of commands

KoopaTrooper ncooper1 at tulane.edu
Thu Oct 11 20:09:46 CEST 2012

I'm trying to figure out how to repeat a series of commands in R and have the
outputs added to a dataframe after each iteration.

My code starts this way...



This is basically just starting off with a new and partially random data set
every time that then goes through a bunch of other commands (not shown) and
ends with the following outputs saved.

Output1, Output2, Output3, Output4

where each of these is just a single number. My questions is:

1. How do I repeat the entire series of commands x number of times and save
each of the outputs into a structure like this:
                      Output1      Output2     Output3     Output4
Iteration 1
Iteration 2
Iteration 3

Not even sure where to start. Are loops the answer? Thanks,

View this message in context: http://r.789695.n4.nabble.com/Repeating-a-series-of-commands-tp4645881.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list