nb2WB: Output spatial weights for WinBUGS

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/nb2listw.R

Description

Output spatial weights for WinBUGS

Usage

1
2
nb2WB(nb)
listw2WB(listw) 

Arguments

nb

an object of class nb

listw

a listw object from for example nb2listw

Value

A list suitable for convering using dput for WinBUGS

Author(s)

Virgilio Gomez-Rubio

References

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

See Also

dput

Examples

1
2
3
4
5
6
7
if (require(rgdal, quietly=TRUE)) {
example(columbus, package="spData")
x <- nb2WB(col.gal.nb)
dput(x, control=NULL)
x <- listw2WB(nb2listw(col.gal.nb))
dput(x, control=NULL)
}

spdep documentation built on Nov. 22, 2017, 5:07 p.m.