View source: R/extract_window.R
extract_window | R Documentation |
Extracts relevant window from raster based on position of central pixel and window size
extract_window(r, w = c(3, 3), idx)
r |
a raster |
w |
A vector of length 2 specifying the dimensions of the rectangular window to use where the first number is the number of rows and the second number is the number of columns. Window size must be an odd number. If a single value is supplied it will be used for both the number of rows and columns. |
idx |
A vector of length 2 representing the row and column position of the central pixel of the window you wish to extract from raster r |
A matrix containg the extracted window around the central pixel from raster r
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.