I have a function (that is within a function and everything wrapped in a
wrapper function) that uses raster::xyValues. When I run the wrapper
function and try to pass xy arguments as a vector (of 2, as mentioned in the
documentation), I get an error that the buffer argument (I call it
effect.distance) doesn't exist. At this point I should note that the object
is a RasterLayer. After some debugging I found that argument for buffer was
not being passed to xyValues local environment (unlike arguments for
objectand xy that had no trouble traversing).

How I made this work:
Either I created an effect.distance variable in the global environment or
coerced the vector of two to a matrix (with two columns).

I noticed that in xyValues.R there is no method for
signature(object="RasterLayer",
xy="vector"). Could this be a problem?


Cheers,
Roman




-- 
In God we trust, all others bring data.

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to