colNum <- sample(20:100,1)
rowNum <- sample(20:100,1)
coords <- expand.grid(list(x = seq(0.5, colNum, 1),
y = seq(0.5, rowNum, 1)))
habitatMask <- matrix(rbinom(colNum*rowNum, 1, 0.8), ncol = colNum, nrow = rowNum)
localObject.list <- getLocalObjects(habitatMask, coords, dmax = 7,resizeFactor = 1)
Run the code above in your browser using DataLab