grd_subset | R Documentation |
The grd_subset()
method handles the subsetting of a grd()
in x-y space. Ordering of indices is not considered and logical
indies are recycled silently along dimensions. The result of
a grd_subset()
is always a grd()
of the same type whose
relationship to x-y space has not changed.
grd_subset(grid, i = NULL, j = NULL, ...)
grd_crop(grid, bbox, ..., step = 1L, snap = NULL)
grd_extend(grid, bbox, ..., step = 1L, snap = NULL)
## S3 method for class 'wk_grd_rct'
grd_crop(grid, bbox, ..., step = 1L, snap = NULL)
## S3 method for class 'wk_grd_xy'
grd_crop(grid, bbox, ..., step = 1L, snap = NULL)
## S3 method for class 'wk_grd_rct'
grd_extend(grid, bbox, ..., step = 1L, snap = NULL)
## S3 method for class 'wk_grd_xy'
grd_extend(grid, bbox, ..., step = 1L, snap = NULL)
grd_data_subset(grid_data, i = NULL, j = NULL)
grid |
A |
i , j |
1-based index values. |
... |
Passed to subset methods |
bbox |
An |
step |
The difference between adjascent indices in the output |
snap |
A function that transforms real-valued indices to integer
indices (e.g., |
grid_data |
The |
A modified grid
whose cell centres have not changed location
as a result of the subset.
grid <- grd_rct(volcano)
grd_subset(grid, 1:20, 1:30)
grd_crop(grid, rct(-10, -10, 10, 10))
grd_extend(grid, rct(-10, -10, 10, 10))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.