Learn R Programming

spdep (version 1.3-6)

nb2WB: Output spatial weights for WinBUGS

Description

Output spatial weights for WinBUGS

Usage

nb2WB(nb)
listw2WB(listw)

Value

A list suitable for convering using dput for WinBUGS

Arguments

nb

an object of class nb

listw

a listw object from for example nb2listw

Author

Virgilio Gomez-Rubio

References

http://www.mrc-bsu.cam.ac.uk/bugs/winbugs/geobugs12manual.pdf

See Also

Examples

Run this code
col.gal.nb <- read.gal(system.file("weights/columbus.gal", package="spData")[1])
x <- nb2WB(col.gal.nb)
dput(x, control=NULL)
x <- listw2WB(nb2listw(col.gal.nb))
dput(x, control=NULL)

Run the code above in your browser using DataLab