Learn R Programming

gecko (version 1.0.2)

normalize: Normalize raster.

Description

Normalize a raster file according to one three methods, 'standard', 'range' or 'rank'.

Usage

normalize(layer, method = "standard", filepath = NULL)

Value

A raster layer.

Arguments

layer

SpatRaster. Object with a single layer as defined by package terra.

method

character. Specifying 'standard', 'range' or 'rank'.

filepath

character. Optional, specifies a path to the output file.

Details

The three options, "standard" standardizes data to a mean = 0 and sd = 1, "range" standardizes to a range of 0 to 1, and "rank" similarly standardizes to a range of 0 to 1 but does so after ranking all points.

Examples

Run this code
if (FALSE) {
region = gecko.data("layers")[[1]]
ranked_region = normalize(region, method = "rank")
}

Run the code above in your browser using DataLab