Skip to content

xyValues, S4 methods and the dreaded NA

2 messages · Roman Luštrik, Robert J. Hijmans

#
Roman,

xyValues (raster package) with a buffer argument, returned NA if the
both of the extreme NS or extreme EW points of the buffer where
outside the raster. This was correct for points outside the raster
with a small buffer, but not for points inside the raster with a very
large buffer (larger than the raster itself). I have fixed this, I
think, in version: 1.2-10 (5-July-2010). Should be available from
R-Forge in 24 hours.

You could have debugged this function by making .xyvBuf visible. E.g. like this:
.xyvBuf <- raster:::.xyvBuf
# and you also need to do this one, because it is inside  .xyvBuf
.couldBeLonLat <- raster:::.couldBeLonLat

Robert
On Mon, Jul 5, 2010 at 1:58 AM, Roman Lu?trik <roman.lustrik at gmail.com> wrote: