powered by
Output spatial neighbours for INLA
nb2INLA(file, nb)
file where adjacency matrix will be stored
an object of class nb
nb
Nothing is returned but a file will be created with the representation of the adjacency matrix as required by INLA for its spatial models.
http://www.r-inla.org
# NOT RUN { if (require(rgdal, quietly=TRUE)) { example(columbus, package="spData") td <- tempdir() x <- nb2INLA(paste(td, "columbus-INLA.adj", sep="/"), col.gal.nb) } # }
Run the code above in your browser using DataLab