[R-sig-Geo] variogram with nominal data
Julien Beguin
julien.beguin.1 at ulaval.ca
Fri Jun 11 20:15:35 CEST 2010
Dear list,
I would like to evaluate spatial dependence for about 10000 spatial data points. However, the variable associated with those points is not continuous as in the data "meuse" but is a land cover type (e.g. WATER). What should I consider as variable Z in the variogram() function with gstat? is it right to take the ID of each point as in the code below?
-----------------------------------------------------------------------------
Z <- data.frame[ which(data.frame$landcover=='WATER'),]$ID
X <- frame$X
Y <- frame$Y
mydata1 <- data.frame(Z, X, Y);
coordinates(mydata1) <- c("X", "Y");
vario01 <- variogram(Z~1, mydata1, cutoff=50000, alpha=c(0,45,90,135))
------------------------------------------------------------------------------
Any advice would be very appreciated. Thank you for your time,
Julien Beguin
------------------
Ph.D. student
Laval University
Québec, Canada
More information about the R-sig-Geo
mailing list