View source: R/explore_partition_geo.R
| explore_partition_geo | R Documentation |
Explore the spatial distribution of partitions for occurrence and background points
explore_partition_geo(data, raster_variables, mask = NULL,
show_partitions = TRUE, partition_palette = "cols25",
custom_partition_palette = NULL, pr_col = "#D55E00",
bg_col = "#0072B2", pr_bg_col = "#CC79A7",
calibration_area_col = "gray80", ...)
data |
an object of class |
raster_variables |
(SpatRaster) predictor variables used for model calibration. |
mask |
(SpatRaster, SpatVector, or SpatExtent) spatial object used to
mask |
show_partitions |
(logical) whether to return |
partition_palette |
(character) the color palette used to color the
different partitions. See |
custom_partition_palette |
(character) a character vector defining
custom colors for the different partitions. The number of values must match
the number of partitions in |
pr_col |
(character) the color used for cells with presence records. Default is "#D55E00". |
bg_col |
(character) the color used for cells with background points. Default is "#0072B2". |
pr_bg_col |
(character) the color used for cells with presences and background points. Default is "#CC79A7". |
calibration_area_col |
(character) the color used for cells without presences or background points. Default is "gray80". |
... |
additional arguments passed to |
A categorical SpatRaster with four factor values representing:
If show_partitions = TRUE, it also returns SpatRaster showing the spatial
distribution of each partition for presence and background points.
# Import raster layers
var <- terra::rast(system.file("extdata", "Current_variables.tif",
package = "kuenm2"))
# Import prepared_data
data(sp_swd, package = "kuenm2")
# Explore partitions in the geographic space
pbg <- explore_partition_geo(data = sp_swd, raster_variables = var[[1]])
terra::plot(pbg)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.