figure | R Documentation |
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.
figure(x, d, scaling = 100, to.disk = FALSE, verbose = FALSE)
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 |
None
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")}
Other Miscellaneous Functions:
dummies()
,
plot3D()
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.