powered by
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)
an object of class nb with a list of integer vectors containing neighbour region number ids.
nb
name of file with GAL lattice data
if TRUE, first line of file contains only number of spatial units, if FALSE, uses newer GeoDa style
Shapefile name taken from GAL file for this dataset
region id indicator variable name
read.gal
# NOT RUN { example(columbus) GALfile <- tempfile("GAL") write.nb.gal(col.gal.nb, GALfile) col.queen <- read.gal(GALfile) summary(diffnb(col.queen, col.gal.nb)) # }
Run the code above in your browser using DataLab