Uniformize raster layers.

Share:

Description

Crop raster layers to minimum size and uniformize NA values accross layers.

Usage

1
raster.clean(layers)

Arguments

layers

Raster* object as defined by package raster.

Details

Excludes all marginal rows and columns with only NA values and change values to NA if they are NA in any of the layers.

Value

A Raster* object, same class as layers.

Examples

1
2
data(data.layers)
raster::plot(raster.clean(data.layers))