I want to compute the variogram from a set of data in R. I am using the function "variogram" from the gstat package.
Now, I want to get the lag vector from the variogram. The problem is that myvariogram$dist returns the averages of the distances between all point paits.
How can I get the lag vector instead?
My data are in two dimension:coordinates x and y with z values
x y z
1 -0.9000000 1.102146e-16 0.160000000
2 -0.8724602 2.209369e-01 0.284010236
3 -0.7915264 4.283527e-01 0.408020473
4 -0.5527914 -7.102265e-01 -0.294704200
5 -0.7102265 -5.527914e-01 -0.170693964
6 -0.8241960 -3.615259e-01 -0.046683727
7 -0.8877252 -1.481351e-01 0.077326509
8 -0.6464646 -3.877551e-01 -0.205706068
9 -0.4444444 -1.428571e-01 -0.154399515
10 -0.5959596 -3.469388e-01 -0.227651744
11 -0.5454545 -5.510204e-01 -0.319427844
12 -0.6464646 -2.040816e-02 0.005767136
13 -0.8484848 -1.836735e-01 0.028933625
14 -0.6969697 -4.285714e-01 -0.174407224
15 -0.4949495 2.040816e-02 0.020626174
16 -0.7474747 2.040816e-02 0.075029711
17 -0.4444444 -3.061224e-01 -0.300002910
18 -0.6464646 1.428571e-01 0.135007208
19 -0.5959596 6.122449e-02 0.061006799
20 -0.5454545 -3.061224e-01 -0.239963488
21 -0.5959596 1.836735e-01 0.164762622
22 -0.3434343 -2.653061e-01 -0.324516690
23 -0.3939394 -3.469388e-01 -0.360400339
24 -0.5454545 6.122449e-02 0.058277761
25 -0.6464646 -3.061224e-01 -0.174779340
myvariog=variogram((z~1, data=mydata))