write.nb.gal | R Documentation |
Write a neighbours list as a GAL lattice file, may also use newer GeoDa header format
write.nb.gal(nb, file, oldstyle=TRUE, shpfile=NULL, ind=NULL)
nb |
an object of class |
file |
name of file with GAL lattice data |
oldstyle |
if TRUE, first line of file contains only number of spatial units, if FALSE, uses newer GeoDa style |
shpfile |
Shapefile name taken from GAL file for this dataset |
ind |
region id indicator variable name |
Roger Bivand Roger.Bivand@nhh.no
read.gal
col.gal.nb <- read.gal(system.file("weights/columbus.gal", package="spData")[1])
GALfile <- tempfile("GAL")
write.nb.gal(col.gal.nb, GALfile)
col.queen <- read.gal(GALfile)
summary(diffnb(col.queen, col.gal.nb))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.