View source: R/coords_to_raster.R
coords_to_raster | R Documentation |
Generate a raster layer from coordinates which can be used in window_gd as the RasterLayer to move the window across
coords_to_raster(
coords,
buffer = 0,
res = 1,
agg = NULL,
disagg = NULL,
plot = FALSE
)
coords |
coordinates of samples as sf points, a SpatVector, a two-column matrix, or a data.frame with x and y coordinates |
buffer |
size of buffer to add to edge of raster (defaults to 0) |
res |
desired resolution of raster (defaults to 1). Can be a single value for square cells or a vector with two values representing x and y resolutions |
agg |
aggregation factor to apply to raster (defaults to NULL) |
disagg |
disaggregation factor to apply to raster (defaults to NULL) |
plot |
whether to plot resulting raster with coords (defaults to FALSE) |
RasterLayer
load_mini_ex()
coords_to_raster(mini_coords, buffer = 1, plot = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.