[R-sig-Geo] autoKrige: singular matrix in function LDLfactor

ElenaC ecouce at gmail.com
Wed Aug 7 09:41:45 CEST 2013


Thanks Jesse, 

the issue does indeed seem to be a malfunctioning of zerodist2(). The first
time I tried, when I got no matches, both SpatialPoints objects were
projected, with proj4string of "+proj=merc +ellps=WGS84". 

I have now tried again with the same data but unprojected (proj4string of
"+proj=longlat +ellps=WGS84"), and I am getting over 10,000 matches. But the
output still doesn't make any sense! (What I understand the function is
meant to do is find indexes in both objects with matching coordinates, but
it is not doing that): 

> match <- zerodist2(HG1990,center_points) 
> dim(match) 
[1] 13478     2 
> 
> match[1,] 
[1]  2840 51188 
> 
> coordinates(HG1990[2840,]) 
     coords.x1 coords.x2 
[1,]        48        48 
> coordinates(center_points[51188,]) 
     coords_lon2 coords_lat2 
[1,]      42.125      42.125 

The coordinates above certainly do not match (in fact there is not a single
pair of matching coordinates out of the over 13,000 rows returned by
zerodist2). Would this be a bug or am I interpreting the output incorrectly? 

These are the library versions I am using: 

> sessionInfo() 
R version 3.0.1 (2013-05-16) 
Platform: x86_64-apple-darwin10.8.0 (64-bit) 

locale: 
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8 

attached base packages: 
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages: 
[1] automap_1.0-12 gstat_1.0-16   ncdf_1.6.6     rgdal_0.8-10   sp_1.0-11     

loaded via a namespace (and not attached): 
[1] grid_3.0.1       intervals_0.14.0 lattice_0.20-15  spacetime_1.0-5 
tools_3.0.1      xts_0.9-5        zoo_1.7-10   



--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/autoKrige-singular-matrix-in-function-LDLfactor-tp7584343p7584363.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list