matrix_to_raster: matrix_to_raster

Description Usage Arguments Details Value Examples

Description

Convert matrix to raster

Usage

1
2
3
matrix_to_raster(matrix, landscape = NULL, landscape_empty = FALSE,
  extent = NULL, resolution = NULL, crs = NULL,
  to_disk = getOption("to_disk", default = FALSE))

Arguments

matrix

matrix with values.

landscape

RasterLayer.

landscape_empty

If true, RasterLayer is landscape_empty

extent

Extent of RasterLayer.

resolution

Resolution of RasterLayer.

crs

CRS of raster layer.

to_disk

If TRUE raster will be saved to disk.

Details

Converts matrix to a raster with same characteristics as landscape. Either landscape or extent, resolution and crs must be specified.

Value

raster

Examples

1
2
test_matrix <- raster::as.matrix(augusta_nlcd)
matrix_to_raster(matrix = test_matrix, landscape = augusta_nlcd)

r-spatialecology/landscapemetrics documentation built on May 20, 2019, noon