Skip to content

Instantly share code, notes, and snippets.

@Ram-N
Created March 2, 2013 00:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ram-N/5068922 to your computer and use it in GitHub Desktop.
Save Ram-N/5068922 to your computer and use it in GitHub Desktop.
# Make multiple runs (Replication of simulation) and take the average of stats
st <- data.frame()
st_row<- vector()
for(i in 1:kNumReplications) {
area_df <- resetIteration()
seedAreaWithPioneers(numPioneers,seeding.opt)
simstats <- accommodateSettlers(kNumSettlers, settling.option)
found.home <- simstats[1]
max.look.around <- simstats[2]
#compute for this iterations
st_row <- store_iteration_stats(i, kNumSettlers, found.home, max.look.around)
st <- rbind(st,st_row)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment