raster.Zscore: Modified z-score for a raster

View source: R/raster.Zscore.R

raster.ZscoreR Documentation

Modified z-score for a raster

Description

Calculates the modified z-score for raster values

Usage

raster.Zscore(x, p.value = FALSE, file.name = NULL, ...)

Arguments

x

A raster class object

p.value

Return p-value rather than z-score raster (FALSE/TRUE)

file.name

Name of raster written to disk

...

Additional arguments passed to writeRaster

Value

raster class object or raster written to disk

Note

Since this functions needs to operate on all of the raster values, it is not memory safe

Author(s)

Jeffrey S. Evans <jeffrey_evans@tnc.org>

Examples


library(terra)
r <- rast(nrows=500, ncols=500)
  r[] <- runif(ncell(r), 0, 1)

# Modified z-score
( z <- raster.Zscore(r) )

# P-value
( p <- raster.Zscore(r, p.value = TRUE) )
	


spatialEco documentation built on Nov. 18, 2023, 1:13 a.m.