[R-sig-Geo] help

Yalemzewod Gelaw yalassefa at gmail.com
Thu Apr 5 05:44:59 CEST 2018


I am a new student to R learning for spatial analysis. I was hoping someone
could help me with the
error message I keep getting when I try to convert the neighbour data to a
listw object use the nb2listw()  function.

plot(xw_nbq, coords,add=TRUE,col="red")> summary(xw_nbq)


Neighbour list object:
Number of regions: 140
Number of nonzero links: 680
Percentage nonzero weights: 3.469388
Average number of links: 4.857143
2 regions with no links:
3 138
Link number distribution:

 0  1  2  3  4  5  6  7  8  9
 2  6  4 16 32 35 17 13 13  2
6 least connected regions:
11 32 57 117 124 137 with 1 link
2 most connected regions:
28 71 with 9 links

​when I try to run nb2listw, i got repated error following the below error
message. ​

xlist <- nb2listw(neighbours,glist = NULL,style = "W",zero.policy
=TRU) > summary.listw(xlist)
Error in summary.listw(xlist) : regions with no neighbours found, use
zero.policy=TRUE

I wonder if someone advises me how to fix the error message from my working
directory
​


*Regards, *

Yalem

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20180405/ea70cb24/attachment.html>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Rplot.png
Type: image/png
Size: 14965 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20180405/ea70cb24/attachment.png>


More information about the R-sig-Geo mailing list