if (FALSE) {
## adjacency matrix with sparse structure (i.e., 2 columns)
## and ar1 neighborhood
sp.ar1 <- proximity_builder(im.res = c(3, 3),
weight = "binary",
neighborhood = "ar1",
type = "sparse")
## adjacency matrix with full structure
## (i.e., prod(im.dim) rows & columns) and ar1 neighborhood
full.ar1 <- proximity_builder(im.res = c(3, 3),
weight = "binary",
neighborhood = "ar1",
type = "full")
## proximity matrix weighted by distance (sparse)
sp.rnd <- proximity_builder(im.res = c(3, 3),
weight = "distance",
neighborhood = "round", r = 2,
type = "sparse",
include.coords = TRUE)
## proximity matrix weighted by distance (full)
full.rnd <- proximity_builder(im.res = c(3, 3),
weight = "distance",
neighborhood = "round", r = 2,
type = "full")
}
Run the code above in your browser using DataLab