This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Execute a round of the Game of Life | |
#' | |
#' I want to play a game. Specifically, Conway's Game of Life. | |
#' | |
#' @param x a matrix populated with 0s and 1s. | |
#' @param birth a vector indicating the birthing rule. Defaults to 3. | |
#' @param stay a vector indicating the stay alive rule Defaults to c(2,3). | |
#' @return a matrix representing an updated input matrix according to the rules | |
#' @references \url{http://en.wikipedia.org/wiki/Conway's_Game_of_Life} | |
#' @author Bryan Goodrich |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created by Bryan Goodrich | |
# Version 0.1 | |
# | |
# Title: List Out Of Lambda [in R] | |
# | |
# An adaptation of Steve Losh's JavaScript exploration[1] with a hat tip to | |
# Hadley Wickham's Advanced R Programming[2] that led me there. | |
# | |
# References | |
# [1] http://stevelosh.com/blog/2013/03/list-out-of-lambda/ |
NewerOlder