Displaying 1 result from an estimated 1 matches for "abovespot".
Did you mean:
aboveknot
2008 Jul 18
0
spreading the risk
...LOCATIONS WHERE
# ONES NEED TO BE ADDED
onespositions <- lapply(1:nrow(whichres),function(.rownum) {
rightspot <- c(whichres[.rownum,1], whichres[.rownum,2]+1)
leftspot <- c(whichres[.rownum,1], whichres[.rownum,2]-1)
belowspot <-c(whichres[.rownum,1]-1, whichres[.rownum,2])
abovespot <- c(whichres[.rownum,1]+1, whichres[.rownum,2])
temp <- rbind(rightspot,leftspot,belowspot,abovespot)
})
# THIS SETS THE CONSTRUCTED INDICES TO 1
for ( i in 1:length(onespositions) ) {
tempbinmat[onespositions[[i]]] <- 1
}
#print(tempbinmat)
# NOW GET RID OF THE ROWS AND COLUMNS...