| matrixToRaster {geoTS} | R Documentation |
Creates a RasterLayer object from a matrix
Description
Transforms a matrix into a RasterLayer object.
Usage
matrixToRaster(matrix, raster = NULL, projection = NULL)
Arguments
matrix |
a matrix object. See Details. |
raster |
a |
projection |
a character vector providing a coordinate reference system.
Required when |
Details
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.
Value
A RasterLayer
Note
In previous versions, raster argument was written in capital letters.
See Also
[Package geoTS version 0.1.8 Index]