Skip to contents

The susceptible matrix is reclassified so positive values become one and negative values become zero. Values which are zero remain zero. This results in a binary classification of inhabitance when given a SpatRaster with population count or susceptible data; regardless, whatever input SpatRaster is provided, a binary classification of the values in the raster are returned in a SpatRaster of equal dimension and with the same coordinate reference system.

Usage

classify.binary(inputRaster)

Arguments

inputRaster

A single-layer SpatRaster

Value

a binary reclassification of the input SpatRaster

Details

The (re)-classification function built-in to terra is much faster than an ad-hoc implementation of the same behaviour, of course, so the built-in method is used (though it requries the reader to learn a little more of the raster library; a good, a necessary, penalty).

Author

Bryce Carson