Skip to content

Instantly share code, notes, and snippets.

@Ram-N
Created Feb 23, 2013
Embed
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
seedColumns(12,2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment