Dear list

I am using the package 'sp' to overlay soil properties in a "SpatialPointsDataFrame" on a grid ""SpatialPixelsDataFrame". I have followed the example from a previous post where it was demonstrated how this can be done with the meuse dataset:

e.g.  meuse.grid[overlay(meuse.grid, meuse) ), c("dist","soil")] # extracts the dist and soil components from the map

In my approach I have a spatial pixles data frame (wf) and a spatial points data frame (soil)

When I overlay them to extract some soil properties:

wf[overlay(wf, soil.params), c("SAND","SILT","CLAY","ORGANIC")]

I get an error:

Error in as(x, "SpatialPointsDataFrame")[i = i, j = j, ...] :
  NAs not permitted in row index

My question: How can I remove the rows with NAs in the row indices? Or I am doing something wrong which is more fundamental?
Many thanks, Barry Rawlins


-- 
This message (and any attachments) is for the recipient ...{{dropped:10}}

