This function transforms raster stack values that describe individual distributions or species distributions into standardized intensity values. All the distributional information in the original raster stack is preserved for visualization.

metrics_pull(x)

Arguments

x

RasterStack of distributions. Layers typically contain information about the distribution of a single individual or species at multiple points in time. Alternatively, layers may contain information about the distributions of multiple individuals or species within a single time period. Other conceptualizations are possible.

Value

A RasterStack containing intensity values. Intensity values are calculated by dividing cell values in every layer by the maximum cell value in the entire stack, thus ensuring intensities are comparable across layers.

The maximum cell value in the stack is stored as the "maximum" attribute.

See also

Other metrics: metrics_distill()

Examples

# load elephant data
data("elephant_ud")
r <- metrics_pull(elephant_ud)
print(r)
#> class      : RasterBrick 
#> dimensions : 208, 193, 40144, 2  (nrow, ncol, ncell, nlayers)
#> resolution : 500, 500  (x, y)
#> extent     : -58642.18, 37857.82, -2376938, -2272938  (xmin, xmax, ymin, ymax)
#> crs        : +proj=moll +lon_0=15.8231920275931 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs 
#> source     : memory
#> names      :      LA11,      LA14 
#> min values :         0,         0 
#> max values : 0.8525854, 1.0000000 
#> 
# maximum value for the stack stored as an attribute
attr(r, "maximum")
#> [1] 0.002409927