View source: R/matrixToRaster.R
| matrixToRaster | R Documentation |
Transforms a matrix into a RasterLayer object.
matrixToRaster(matrix, raster = NULL, projection = NULL)
matrix |
a matrix object. See Details. |
raster |
a |
projection |
a character vector providing a coordinate reference system.
Required when |
When ncol(matrix)=3, this function assumes that the first two
columns of argument matrix provide coordinates to create a RasterLayer,
hence argument projection must be provided. When argument matrix has
only 2 columns, then the argument raster must be provided because its
coordinates and projection will be used
to rasterize matrix.
A RasterLayer
In previous versions, raster argument was written in capital letters.
Raster-class
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.