data(afcon)
oid <- order(afcon$id)
resG <- localG(afcon$totcon, nb2listw(include.self(paper.nb)))
print(data.frame(resG[oid], row.names=afcon$name[oid]), digits=2)
resI <- localmoran(afcon$totcon, nb2listw(paper.nb))
print(data.frame(resI[oid,], row.names=afcon$name[oid]), digits=2)
Run the code above in your browser using DataLab