Chris,
That worked exceptionally well. Here's the pseudo-code for what I ended up
using:
library(spatstat)
depth_bin<-depth<-stage-elevation #depth at grid cells = stage matrix -
elevation matrix; initialize binary matrix
depth_bin[,]<-depth>5 #binary matrix of cells >5cm deep
depth_con_im<-con
Dear Bryan,
You could try using spatial techniques to choose the contiguous areas of your
matrices.
> require(spatstat)
> set.seed(1520)
> x <- matrix(rnorm(25), nrow=5, ncol=5,
+ dimnames=list(c("A","B","C","D","E"), c("v","w","x","y","z")))
> x
vw x
2 matches
Mail list logo