Skip to content

Instantly share code, notes, and snippets.

@Ram-N
Created March 11, 2013 19:01
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/5136733 to your computer and use it in GitHub Desktop.
Save Ram-N/5136733 to your computer and use it in GitHub Desktop.
getNextGen <- function(x) {
nextgen <- list()
for(i in seq(1, kStartPop, by=2)) {
firstborn <- getOffspring(x[i], x[i+1])
secondborn <- getOffspring(x[i], x[i+1])
nextgen[i] <- firstborn
nextgen[i+1] <- secondborn
}
return(unlist(nextgen))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment