Skip to contents

Vectorization helpers

Breaks vectorize

Quantile breaks

Quantile vectorize by integer helper

Quantile vectorize by probabilities vector helper

Usage

calculate_breaks(mraster, breaks)

calculate_quantile_breaks(mraster, nStrata)

quantile_breaks_integer(mraster, nStrata)

quantile_breaks(mraster, nStrata)

Arguments

mraster

Spatraster. Raster to stratify. Layers in mraster must match the number of breaks vectors provided.

breaks

Numeric. Vector of breakpoints for each layer of mraster. If mraster has multiple layers, breaks must be a list with an equal number of objects.

nStrata

Numeric. A positive integer representing the number of desired classes or a numeric vector of probabilities with values between 0-1. If mraster has multiple layers, nStrata must be a list with an equal number of objects.