Skip to content

Instantly share code, notes, and snippets.

Created Feb 23, 2013
What would you like to do?
# w-cols to the R and L of center column
seedColumns <- function(c, w){
startLCol = as.integer( (areaW-c) / 2 )
startRCol = as.integer( (areaW+c) / 2 )
for(y in 1:areaH) {
clist = c((startLCol-w):startLCol, startRCol:(startRCol+w))
lapply(clist, function(x) area_df[x,y] <<- 1)
#seed two vertical columns of width w
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment