<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif;font-size:small;color:rgb(0,0,0)">I am a new student to R learning for spatial analysis. I was hoping someone could help me with the<br>error message I keep getting when I try to convert the neighbour data to a listw object use the nb2listw()  function. <br clear="all"></div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><pre tabindex="0" class="gmail-GGHFMYIBMOB" id="gmail-rstudio_console_output" style="font-family:"Lucida Console";font-size:10pt;outline:medium none currentcolor;border:medium none;word-break:break-all;margin:0px;white-space:pre-wrap;line-height:15px;color:rgb(0,0,0);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255)"><span class="gmail-GGHFMYIBCOB gmail-ace_keyword" style="color:blue"><pre tabindex="0" class="gmail-GGHFMYIBMOB" id="gmail-rstudio_console_output" style="font-family:"Lucida Console";font-size:10pt;outline:medium none currentcolor;border:medium none;word-break:break-all;margin:0px;white-space:pre-wrap;line-height:15px;color:rgb(0,0,0);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255)"><span class="gmail-GGHFMYIBCOB gmail-ace_keyword" style="color:blue">plot(xw_nbq, coords,add=TRUE,col="red")
</span><span class="gmail-GGHFMYIBCPB gmail-ace_keyword" style="color:blue;white-space:pre">> </span><span class="gmail-GGHFMYIBCOB gmail-ace_keyword" style="color:blue">summary(xw_nbq)</span></pre><br><pre tabindex="0" class="gmail-GGHFMYIBMOB" id="gmail-rstudio_console_output" style="font-family:"Lucida Console";font-size:10pt;outline:medium none currentcolor;border:medium none;word-break:break-all;margin:0px;white-space:pre-wrap;line-height:15px;color:rgb(0,0,0);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255)">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</pre><div style="font-family:georgia,serif;font-size:small;color:rgb(0,0,0);display:inline" class="gmail_default">​when I try to run nb2listw, i got repated error following the below error message. ​</div><br>xlist <- nb2listw(neighbours,glist = NULL,style = "W",zero.policy =TRU)
</span><span class="gmail-GGHFMYIBCPB gmail-ace_keyword" style="color:blue;white-space:pre">> </span><span class="gmail-GGHFMYIBCOB gmail-ace_keyword" style="color:blue">summary.listw(xlist)
</span><span class="gmail-GGHFMYIBGOB gmail-ace_constant gmail-ace_language" style="color:rgb(88,92,246)">Error in summary.listw(xlist) : 
  regions with no neighbours found, use zero.policy=TRUE</span></pre><div style="font-family:georgia,serif;font-size:small;color:rgb(0,0,0);display:inline" class="gmail_default">I wonder if someone advises me how to fix the error message from my working directory <br>

​</div><br><br></div><div><font size="2" color="#134f5c" face="arial black, sans-serif"><b>Regards, </b></font></div><div><font size="2" color="#134f5c" face="arial black, sans-serif"><b><br></b></font></div><div><font size="2" face="arial black, sans-serif">Yalem</font></div><div><div><span style="font-family:garamond,serif"><i><u><font size="1" color="#741b47"></font></u></i></span></div><span style="font-family:garamond,serif"><span style="color:rgb(68,68,68)"></span></span></div><div><span style="font-size:small;font-family:garamond,serif"><span style="color:rgb(0,0,255)"></span></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>