Skip to contents

Create an example mask within a given raster

Usage

example_mask(raster, pc_threshold = NULL)

Arguments

raster

generated from example_raster for example

pc_threshold

A threshold percentile to divide mask / non mask elements

Value

A spatRaster

Examples

example_mask(example_raster(), pc_threshold=0.5)
#> class       : SpatRaster 
#> dimensions  : 10, 10, 1  (nrow, ncol, nlyr)
#> resolution  : 1, 1  (x, y)
#> extent      : 0, 10, 0, 10  (xmin, xmax, ymin, ymax)
#> coord. ref. :  
#> source(s)   : memory
#> name        :   example 
#> min value   : 0.8193747 
#> max value   : 7.3352526