Skip to content
Prev 132667 / 398506 Next

matrix to gal object

bernardo lagos alvarez <blacertain <at> gmail.com> writes:
RSiteSearch("matrix listw")

gets you to several threads on the R-sig-geo list, suggesting in your case:

w <- mat2listw(wdat)
# convert matrix to spatial weights list
write.nb.gal(w$neighbours, "wdat.gal")
# write neighbours component of spatial weights list as GAL file

Roger Bivand