Skip to content
Prev 5508 / 7420 Next

spatial analysis with dbMEM

Hi Andy,

I am probably not the most qualified person to answer this, but I think I
may have a solution to your issue.


1.  It seems that nb is an old (or alternative) way to specify the labels
for the plot.  The documentation suggests using label.  I could not find nb
defined and was rarely used in:
https://cran.r-project.org/web/packages/adegraphics/adegraphics.pdf
<https://cran.r-project.org/web/packages/adegraphics/adegraphics.pdf>

2.  This example helped me better understand the syntax of the s.label
function:

data(mafragh, package = "ade4")
g2 <- s.label(mafragh$xy, nb = mafragh$nb, paxes.draw = FALSE)

You can see that both the $nb list and $xy dataframe have the same number
of observations (which is important- as you point out).

3.  you can extract the list from the mite data using:   attr(mite.dbmem1,
"listw")$neighbours

so putting it all together:

s.label(mite.xy, label = attr(mite.dbmem1, "listw")$neighbours)


alternatively (making the list an object named mite.nb):

mite.nb <- attr(mite.dbmem1, "listw")$neighbours
s.label(mite.xy, label = mite.nb)



Code generated the plot for me.
I hope this helps,
Best,

Aaron Hogan
(970) 485-1412
hogieskier at gmail.com

On Mon, Jan 16, 2017 at 9:50 PM, Andrew Halford <andrew.halford at gmail.com>
wrote: