[R-sig-Geo] A simple correlogram using sp.correlogram with data(meuse)

Andy Bunn Andy.Bunn at wwu.edu
Tue Apr 28 07:09:35 CEST 2015


Hi all, This seems trivial easy but being a bear of very little brain...

I'm looking to build a correlogram using Moran's I and the function
sp.correlogram() with data(meuse) as a SpatialPointsDataFrame. I've done
so with the ncf library using correlog() but getting the equivalent out of
library sp is eluding me. Can somebody help me out?

-Andy

require(sp)
require(ncf)
data(meuse)
coordinates(meuse) <- ~x+y
proj4string(meuse) <- CRS("+init=epsg:28992")
ncf.cor <- correlog(x=coordinates(meuse)[,1], y=coordinates(meuse)[,2],
z=meuse at data$zinc, increment=200, resamp=100)



More information about the R-sig-Geo mailing list