Converts a matrix to a raster object using the CRS and extent of a reference raster

matrix.to.raster(m, r_ref)

Arguments

m

Matrix.

r_ref

A raster object from raster used as a reference for CRS and extent

Value

a raster object projected in reference CRS and extent