[R-sig-Geo] bug in process definition for retrieving point pair indexes from varigramCloud

Mark Connolly wmconnol at ncsu.edu
Sun Feb 28 15:27:25 CET 2010


gstat reference states

If cloud is TRUE: an object of class variogramCloud, with the field np 
encoding the numbers of the point pair that contributed to a variogram 
cloud estimate, as follows. The first point is found by the integer 
division of np by 2^16, the second point by the remainder of that division.

For
Classes ‘variogramCloud’ and 'data.frame': 3275 obs. of 6 variables:
$ np : num 8.59e+09 8.00 8.59e+09 1.29e+10 1.29e+10 ...
$ dist : num 18.8 79.2 77.8 78.7 100.1 ...
$ gamma : num 0.781 0.845 12.903 5.611 0.344 ...
$ dir.hor: num 0 0 0 0 0 0 0 0 0 0 ...
$ dir.ver: num 0 0 0 0 0 0 0 0 0 0 ...
$ id : Factor w/ 1 level "var1": 1 1 1 1 1 1 1 1 1 1 ...
- attr(*, "direct")='data.frame': 1 obs. of 2 variables:
..$ id : Factor w/ 1 level "var1": 1
..$ is.direct: logi TRUE
- attr(*, ".BigInt")= num 4.29e+09


v[1,] yields:
dist gamma dir.hor dir.ver id left right
1 18.75474 0.78125 0 0 var1 6 3


v$np[1] %/% 2^16 yields:
131072

Which is != 6

Am I misinterpreting the documentation?

-- 

Mark Connolly
Graduate Student, Master of Science
Department of Soil Science
North Carolina State University



More information about the R-sig-Geo mailing list