View source: R/layer_to_matrix.R
layer_to_matrix | R Documentation |
stars
layer values as matrixExtracts the values of a single layer in a stars
object to a matrix
.
layer_to_matrix(x, check = TRUE)
x |
A |
check |
Whether to check (and fix if necessary) that input has one attribute, one layer and x-y as dimensions 1-2 (default is |
A matrix
with the layer values, having the same orientation as the raster (i.e., rows represent the y-axis and columns represent the x-axis).
data(dem)
m = layer_to_matrix(dem)
m
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.