Learn R Programming

spdep (version 1.3-6)

nb2INLA: Output spatial neighbours for INLA

Description

Output spatial neighbours for INLA

Usage

nb2INLA(file, nb)

Value

Nothing is returned but a file will be created with the representation of the adjacency matrix as required by INLA for its spatial models.

Arguments

file

file where adjacency matrix will be stored

nb

an object of class nb

Author

Virgilio Gomez-Rubio

References

http://www.r-inla.org

Examples

Run this code
col.gal.nb <- read.gal(system.file("weights/columbus.gal", package="spData")[1])
td <- tempdir()
x <- nb2INLA(paste(td, "columbus-INLA.adj", sep="/"), col.gal.nb)
readLines(paste(td, "columbus-INLA.adj", sep="/"), n=10)

Run the code above in your browser using DataLab