raster_to_matrix | R Documentation |
Given a raster stack with layer names, and a vector of names to extract from that raster stack, use the raster::getValues() function to extract the values from each layer and put each flattened layer in the column of a matrix.
raster_to_matrix(r, rnames)
r |
Raster stack with layer names |
rnames |
Vector of names from the raster stack |
Numeric matrix with column names matching rnames
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.