Re: [R] Subsetting NaN values in localG()

2011-07-16 Thread Roger Bivand
Writing to R-sig-geo would have been a good idea if you required speedier response. That response would have suggested that your code is not at all helpful, not using available classes in R for handling spatial data. You could have read your Arc GRID into a SpatialGridDataFrame, and made everything

Re: [R] Subsetting NaN values in localG()

2011-07-13 Thread dab98
Still have not solved this problem with package 'spdep'. It appears localG() cannot handle either SpatialPoints or a matrix of point coordinates that are not in a rectangular matrix when plotted. It cannot take NaN values and, after I successfully used dnearnigh() to create an "nb" object for ONLY

[R] Subsetting NaN values in localG()

2011-07-12 Thread dab98
Hi, I'm currently trying to calculate local Getis-Ord Gi* statistics for a 169x315 cell matrix of temperature values, below is the code I currently have (diffc is the data vector I am removing NaN values from, and I am moving said values to diffD; -999 represents NaN values; id contains ID values