# NOT RUN {
# Murray Smelter site dataset
data(murray)
# defining the arsenic (As) and lead (Pb) variables from the murray dataset
x <- murray$As
y <- murray$Pb
# extracting the coordinates from Murray dataset
coords <- murray[c("xpos","ypos")]
# computing Tjostheim's coefficient
z <- cor.spatial(x, y, coords)
z
# }
Run the code above in your browser using DataLab