Skip to contents

This function is intended to reproduce the figures presented in rassta: Raster-based Spatial Stratification Algorithms (Fuentes et al., 2021). Note that this function assumes that all the necessary inputs for each figure are loaded in the working environment. For the creation of each input, please refer to the data and examples presented in the aforementioned work. Also, please note that the use of this function is not intended for RStudio.

Usage

figure(x, d, scaling = 100, to.disk = FALSE, verbose = FALSE)

Arguments

x

Integer. Number identifying the figure to reproduce.

d

List. List with the data required for the figure to reproduce.

scaling

Integer. This number scales (i.e., resizes) the R's plotting device, such that width = x/scaling & height = x/scaling, with x = pixels. The default pixel size (not adjustable) and scaling value should work fine. Default = 100

to.disk

Boolean. Save figure to disk? Default = FALSE

verbose

Boolean. Show warning messages in the console? Default: FALSE

Value

None

References

B.A. Fuentes, M.J. Dorantes, and J.R. Tipton. rassta: Raster-based Spatial Stratification Algorithms. EarthArXiv, 2021. doi:10.31223/X50S57

See also

Other Miscellaneous Functions: dummies(), plot3D()

Examples

if(interactive()){
require(terra)
p <- system.file("exdat", package = "rassta")
# Single-layer SpatRaster of geologic units
f <- list.files(path = p, pattern = "geology.tif", full.names = TRUE)
geol <- terra::rast(f)
# Dummy layers from geologic units
mat.sig <- dummies(ca.rast = geol, preval = 100, absval = 0)
figure(17, d = mat.sig)
}