hannezish
hannezish

Reputation: 21

variogram function in R returns one single observation

I'm trying to construct a variogram cloud in R using the variogram function from the gstat package. I'm not sure if there's something about the topic that I've misunderstood, but surely I should get more than one observation, right? Here's my code:

data = data.frame(matrix(c(2, 4, 8, 7, 6, 4, 7, 9, 4, 4, -1.01, .05, .47, 1.36, 1.18), nrow=5, ncol=3))
data = rename(data, X=X1, Y=X2, Z=X3)
coordinates(data) = c("X","Y")

var.cld = variogram(Z ~ 1,data=data, cloud = TRUE)

And here's the output:

> var.cld
  dist  gamma dir.hor dir.ver   id left right
1    1 0.0162       0       0 var1    5     4

Upvotes: 1

Views: 102

Answers (1)

hannezish
hannezish

Reputation: 21

I found the problem! Apparently the default value of the cutoff argument was too low for my specific set of data. Specifying a higher value resulted in additional observations.

Upvotes: 1

Related Questions