figure: Reproduce Figures from Fuentes et al. (n.d.)

View source: R/figure.r

figureR Documentation

Reproduce Figures from Fuentes et al. (n.d.)

Description

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. \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/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)
}


rassta documentation built on Sept. 11, 2024, 6:33 p.m.