search for: leftspot

Displaying 1 result from an estimated 1 matches for "leftspot".

2008 Jul 18
0
spreading the risk
...whichres <- which(tempbinmat == 1, arr.ind=TRUE) # THIS LAPPLY GOES THROUGH THE LOCATIONS WHERE # THERE ARE ONES AND FINDS 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:...