Unlike grd_subset()
, which subsets like a matrix, grd_extract()
returns
values.
grd_extract(grid, i = NULL, j = NULL)
grd_extract_nearest(grid, point, out_of_bounds = c("censor", "squish"))
grd_data_extract(grid_data, i = NULL, j = NULL)
A grd_xy()
, grd_rct()
, or other object
implementing grd_*()
methods.
Index values as in grd_subset()
except recycled to a common
size.
A handleable of points.
One of 'keep', 'censor', 'discard', or 'squish'
The data
member of a grd()
. This is typically an
array but can also be an S3 object with an array-like subset method.
The native raster is special-cased as its
subset method requires non-standard handling.
A matrix or vector with two fewer dimensions than the input.