[R-sig-eco] Fwd: spatial analysis with dbMEM
THIOULOUSE JEAN
Jean.Thioulouse at univ-lyon1.fr
Tue Jan 17 07:01:47 CET 2017
Hi
You need to load the adegraphics package AFTER loading the ade4 and adespatial packages.
There are two versions of the s.label function : one in the ade4 package and one in the adegraphics package. The one you need here is the second one.
Jean
> Le 17 janv. 2017 à 03:50, Andrew Halford <andrew.halford at gmail.com> a écrit :
>
> Hi Listers,
>
> I am trying to wrap my head around spatial eigenvector analyses and have
> been trying to recreate the example code attached to the dbmem{adespatial}
> documentation.
>
> I am getting an error message when I try to run the following... The data
> is drawn from the oribatid dataset.
>
> data(oribatid)
>
> mite <- oribatid$fau
> mite.xy <- oribatid$xy
> mite.dbmem1 <- dbmem(mite.xy, thresh=1.012, MEM.autocor = "non-null",
> silent = FALSE)
> s.label(mite.xy, nb = attr(mite.dbmem1, "listw"))
>
> Error in s.label(mite.xy, nb = attr(mite.dbmem1, "listw")) :
> unused argument (nb = attr(mite.dbmem1, "listw"))
> I dont know what the nb argument is here?
>
> # Plot maps of the first 3 dbMEM eigenfunctions
> s.value(mite.xy, mite.dbmem1[,1:3])
>
> Error in s.value(mite.xy, mite.dbmem1[, 1:3]) :
> Non equal row numbers 70 3
>
>
> I checked the mite.xy and mite.dbmem1 data and they both have 70 rows?
>
> Andy
>
>
>
> --
> Andrew Halford Ph.D
> Research Scientist (Kimberley Marine Parks)
> Dept. Parks and Wildlife
> Western Australia
>
> Ph: +61 8 9219 9795 <+61%208%209219%209795>
> Mobile: +61 (0) 468 419 473 <+61%20468%20419%20473>
>
>
>
> --
> Andrew Halford Ph.D
> Research Scientist (Kimberley Marine Parks)
> Dept. Parks and Wildlife
> Western Australia
>
> Ph: +61 8 9219 9795
> Mobile: +61 (0) 468 419 473
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
More information about the R-sig-ecology
mailing list