Skip to content
Prev 731 / 29559 Next

join count with a grid that has NA's

Thanks Roger
Started with the easier of the two which was to turn NA into a factor level.

However, I feel drawn to the "subsetting" option. However, here is my dilemma (or more like my ignorance at this point)

1. spdep has subset.listw and subset.nb to subset the spatial weights or the neighbors lists respectively (by the way 
does c(31, 34) in the example in the help file mean that columns 31 and 34 will be dropped?)

2 However, I have (using RSiteSearch) tried to look for a function subsetting a spatialgriddataframe but have had no 
luck. Any pointers

More fundamentally, my intuition is that I need to start the subsetting process with mygrid and somehow retain a vector 
of the rows or columns dropped and pass this information on the the subset.listw or subset.nb so that the same cells are 
dropped in the neighbor list. Now that is as far as I can go (thinking...), any ideas on how to proceed?

Ronnie
Roger Bivand wrote: